ANTAREX API

Clava API

LARA API

LARA Common Language API

Logger

Constructor

Logger

new Logger([isGlobal = false], [filename = undefined])

Logger object, for inserting code that prints/saves information to files.

Parameters

isGlobal: boolean - Not implemented, please ignore (optional)
filename: String - If set, instead of printing, will insert code for writing output to this file (optional)

Instance Members

Type

Type

Type.LONGLONG

Type.LONGLONG

append

append(text)

Appends the given string to the current buffer.

Parameters

text: String - the text to append

Returns

lara.code.Logger - the current logger instance

appendChar

appendChar(expr)

Appends an expression that represents a char.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendDouble

appendDouble(expr)

Appends an expression that represents a double.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendHex

appendHex(expr)

Appends an expression that represents a hex number.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendInt

appendInt(expr)

Appends an expression that represents a int.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendLong

appendLong(expr)

Appends an expression that represents a long.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendLongLong

appendLongLong(expr)

Appends an expression that represents a long long.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendOctal

appendOctal(expr)

Appends an expression that represents an octal.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendString

appendString(expr)

Appends an expression that represents a string.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

appendln

appendln(text)

The same as 'append', but adds a new line at the end of the buffer.

Parameters

text: String - the text to append

Returns

lara.code.Logger - the current logger instance

char

char(expr)

The same as 'appendChar'.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

double

double(expr)

The same as 'appendDouble'.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

getAfterJp

getAfterJp()

The 'last' join point after .log() is called.

Returns

$jp

hex

hex(expr)

The same as 'appendHex'.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

int

int(expr)

The same as 'appendInt'.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

isGlobalFn

isGlobalFn()

ln

ln()

Appends a new line to the buffer.

Returns

lara.code.Logger - the current logger instance

log

log($jp, insertBefore)

Adds code that prints the message built up to that point with the append() functions.

TODO: Improve this comment, add JSDoc tags

Parameters

$jp: any
insertBefore: any

logBefore

logBefore($jp)

Helper method which call 'log' with 'insertBefore' set to true

Parameters

$jp: any

long

long(expr)

The same as 'appendLong'.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

longLong

longLong(expr)

Appends an expression that represents a long long.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

octal

octal(expr)

The same as 'appendOctal'.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

printfFormat

printfFormat

Used for both C and Java printf functions


printfFormat.Logger.prototype.Type.LONGLONG

printfFormat.Logger.prototype.Type.LONGLONG

string

string(expr)

The same as 'appendString'.

Parameters

expr: $jp - the expression to append

Returns

lara.code.Logger - the current logger instance

tab()

Appends a tab to the buffer.

Returns

lara.code.Logger - the current logger instance

text

text(text)

The same as 'append'.

Parameters

text: String - the text to append

Returns

lara.code.Logger - the current logger instance