Logger
Powerful logging utilities to enhance your server terminal output.
Last updated
Was this helpful?
Powerful logging utilities to enhance your server terminal output.
Last updated
Was this helpful?
You can use the logger provided in "app" to create simple logs in the server terminal while remaining in the system logger theme. For example in a command where one of the actions may be problematic, you can do this:
You can also uses the other methods of logging like app.log()
for default informative logs, app.warn()
for warning logs and app.success()
for congratulations.
If you need a logger for a specific behavior or theme, you can create one using the class present in the lib. For example in a namespace supposed to represent a websocket exchange:
You can update the default logger configuration by modifying the logger
property in your src/config.ts
file. Here is an example of a configuration that removes the logger styles: