Liking cljdoc? Tell your friends :D

szew.essbase.logs

Essbase application log and MaxL spool.

Application logs

Log timestamp line looks like:

[Tue Nov 06 08:50:26 2001]Local/Sample///Info(1013214)

So it's [timestamp]Local/application/database/issuer/type(code) more or less.

And then data follows, that looks like this:

Clear Active on User [admin] Instance [1];

So this one contains user info, but it could be Command [.+] or Database [.+] etc.

TODO: break entries into fields, not only headers?

Fields you'll get using AppLog:

  • full timestamp, decoded from date
  • date: yyyy-mm-dd decoded from timestamp
  • application: String
  • database: String
  • user: String
  • level: Info | Warning | Error | ???
  • code: int
  • raw: String, full payload of the entry (head + message)

Additional tables of use: Code categories [1].

MaxL shell spool

And then there's MaxL allowing you to see all the useful system properties, and even run MDX queries and get results back, almost like in a real database, but only if you remember to set the column_width just right, or it will truncate those space padded, fixed width table outputs.

FIXME: can headers in MaxL output be multiline?

I just set it to 256 and that's the default value here. YMMV.

That MaxLSpool will help you extract those, remove the padding and pack columns into hash maps. Will also keep MaxL output preceding and following tabular output.

Some 'special' values are resolvable via maxl-constants map. It's WIP with little P.

[1] https://docs.oracle.com/cd/E12825_01/epm.111/esb_dbag/dlogs.htm

Essbase application log and MaxL spool.

# Application logs

Log timestamp line looks like:

  [Tue Nov 06 08:50:26 2001]Local/Sample///Info(1013214)

So it's [timestamp]Local/application/database/issuer/type(code) more or less.

And then data follows, that looks like this:

  Clear Active on User [admin] Instance [1];

So this one contains user info, but it could be Command [.+]
or Database [.+] etc.

TODO: break entries into fields, not only headers?

Fields you'll get using AppLog:

* full timestamp, decoded from date
* date: yyyy-mm-dd decoded from timestamp
* application: String
* database: String
* user: String
* level: Info | Warning | Error | ???
* code: int
* raw: String, full payload of the entry (head + message)

Additional tables of use: Code categories [1].

# MaxL shell spool

And then there's MaxL allowing you to see all the useful system properties,
and even run MDX queries and get results back, almost like in a real database,
but only if you remember to set the column_width just right, or it will
truncate those space padded, fixed width table outputs.

FIXME: can headers in MaxL output be multiline?

I just set it to 256 and that's the default value here. YMMV.

That MaxLSpool will help you extract those, remove the padding and pack columns
into hash maps. Will also keep MaxL output preceding and following tabular
output.

Some 'special' values are resolvable via maxl-constants map. It's WIP with
little P.

[1] https://docs.oracle.com/cd/E12825_01/epm.111/esb_dbag/dlogs.htm
raw docstring

app-logclj

(app-log)
(app-log spec)

Just zip entry headers with their payload, then feed to the processor.

Just zip entry headers with their payload, then feed to the processor.
raw docstring

maxl-constantsclj

Some predefined values from Oracle docs.

Some predefined values from Oracle docs.
raw docstring

maxl-prompt?clj

(maxl-prompt? line)

Tries to find MaxL shell prompt in the beginning of given line.

Tries to find MaxL shell prompt in the beginning of given line.
raw docstring

maxl-spoolclj

(maxl-spool)
(maxl-spool spec)

Process MaxL spool files, packs are data from prompt to prompt.

Returns:

{:head [String], :data [{Keyword String}], :tail [String]} ;; or {:head [String], :data [], :tail []}

MaxL spool setup:

MAXL> set column_width 256;

MAXL> set timestamp on;

MAXL> spool on to '/your/file/location.log';

And then process output:

  • Split by maxl-prompt? into blocks.
  • If no lines in block are multiple of column-width:
    • Head: just trimmed lines from the block
    • Data: empty vector
    • Tail: empty vector
  • If any lines in block are multiples of column-width:
    • Head: prompt (lines before wide lines)
    • Data: data (fixed-width tabular data, split, trimmed, recordified)
    • Tail: additional output at the end: INFO, WARNING, timestamp etc.

Each returned map is having some meta attached, might want to take a peek.

Process MaxL spool files, packs are data from prompt to prompt.

Returns:

{:head [String], :data [{Keyword String}], :tail [String]}
;; or
{:head [String], :data [], :tail []}

MaxL spool setup:

MAXL> set column_width 256;

MAXL> set timestamp on;

MAXL> spool on to '/your/file/location.log';

And then process output:

* Split by maxl-prompt? into blocks.
* If no lines in block are multiple of column-width:
  - Head: just trimmed lines from the block
  - Data: empty vector
  - Tail: empty vector
* If any lines in block are multiples of column-width:
  - Head: prompt (lines before wide lines)
  - Data: data (fixed-width tabular data, split, trimmed, recordified)
  - Tail: additional output at the end: INFO, WARNING, timestamp etc.

Each returned map is having some meta attached, might want to take a peek.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close