Logging to the Console

Logging to the Console

The console logging target instructs AMPS to log certain messages to the console. Both the standard output and standard error streams are supported. To select standard out use a Protocol setting of stdout. Likewise, for standard error use a Protocol of stderr.

Example

Below is an example of a console logger that logs all messages at the info or warning level to standard out and all messages at the error level or higher to standard error (which includes error, critical and emergency levels).

<AMPSConfig>
    ...
    <Logging>
        <Target>
            <Protocol>stdout</Protocol>
            <Levels>info,warning</Levels>
        </Target>
        <Target>
            <Protocol>stderr</Protocol>
            <Level>error</Level>
        </Target>
    </Logging>
    ...
</AMPSConfig>

Last updated

Copyright 2013-2024 60East Technologies, Inc.