🦉
Anacleto
GitHub
  • Anacleto
  • Getting started
    • Setup Anacleto
      • Setup local environmen
    • First tutorial
  • Anacleto Frontend
    • UI Builder
      • Components
        • DataTable
        • Form
          • Controls
            • Autocomplete
            • Button
            • CodeEditor
            • Dropdown
            • Image
            • InputText
            • Label
        • GridContainer
        • Splitter
        • Stack
        • TabView
        • Tree
    • Translation
    • Frontend script
      • Dialog and Toast
      • Window
  • Anacleto Backend
    • Backend script
      • googleBigQuery
      • googleDatastore
      • logger - console
      • mysql
      • Utils
  • Google cloud platform
    • Google
  • Anacleto developer
    • Work with us
      • Guidelines
    • Setup local enviroment
Powered by GitBook
On this page
  • Example
  • log
  • Syntax
  • info
  • Syntax
  • warn
  • Syntax
  • error
  • Syntax
  1. Anacleto Backend
  2. Backend script

logger - console

Utility class to log information

Anacleto saves the logs of your scripts in rotating files using the json format.

The logging functionality can be accessed using both the console and logger classes. Both features give access to the methods log, info, warn, error all these methods allow you to pass a variable number of attributes and they will arrange themselves to create a properly formatted log.

Use logger on console as you prefer

Don't concatenate strings in the log, let logger do its job!

Example

const resp = {success: true, data : [1,2,3]}
logger.info(`Resp`, resp);

console result

Resp {success:true,data:[1,2,3]}

log

Log a message

Syntax

console.log(msg)

info

Log a info level message

Syntax

console.info(msg,[data..])

warn

Log a warn level message

Syntax

console.warn(msg,[data..])

error

Log a error level message

Syntax

console.error(msg,[data..])
PreviousgoogleDatastoreNextmysql

Last updated 2 years ago