CFML Error Logging
By default, the Logstash appender becomes enabled with the installation of stachebox into an application.
To use the defaults while customizing the application name you can either add the LOGSTASH_APPLICATION_NAME
environment variable, or you can provide the variable in your config/Coldbox.cfc
:
In addition, if choosing to run a stachebox instance as a standalone installation, you may install only the logstash
module in to your application and configure it to log either directly to the elasticsearch server ( the default, will use the [Elasticsearch configuration options] ) or, to log directly to the stachebox instance API, you may a custom API configuration to your Coldbox configuration file, like so:
You may read more about configuring the logstash module here.
In addition, you may configure separate appenders with different logging levels. For example, you might want warn level logging for a custom module, such as authentication. An example configuration of this type of custom appender:
Then, in your top-level logbox configuration you would simply add:
which would log only warnings from that specific module to the separate -warnings
index configured above.
For more granular control and additional information on appenders, see the cbElasticsearch Logging documentation.
Last updated