heliosx_logger_hires_search - search the Helios high resolution log
# display the log messages for jobid 12345 heliosx_logger_hires_search --jobid=12345 # heliosx_logger_hires_search normally displays only the first 50 messages # use the -n or --lines option to increase/decrease that limit heliosx_logger_hires_search --jobid=12345 -n 100 # display the last 10 MyService errors, sorted by most recent first heliosx_logger_hires_search --service=MyService --priority=ERR -n 10 --sort=desc # display all the MyService log messages for May 29, 2015 # all dates are in ISO8601 format # specifying dates will turn off the message limit, # so you will get all the messages for the specified date range heliosx_logger_hires_search --service=MyService --start-date=2015-05-29T00:00:00 --end-date=2015-05-29T23:59:59 # "tail" and "follow" the log, like 'tail -f' in Unix heliosx_logger_hires_search --tail --follow # display the last 100 log messages logged by MyService, # then follow the log and display any new MyService messages heliosx_logger_hires_search --service=MyService -t -n 100 -f
The heliosx_logger_hires_search command can be used to display log messages matching specified criteria in the enhanced Helios log provided by HeliosX::Logger::HiRes. It provides a much more convenient way of accessing log messages than using SQL queries from a database client like SQL*Plus or sqlite3.
Specify a date range of log messages to display. Dates should be in ISO8601 format. If only --start-date is specified, log messages will be displayed from that date forward until there are no more log messages. If only --end-date is specified, log messages will be displayed from the earliest through the end date specified.
Normally, heliosx_logger_hires_search displays a maximum number of log messages. The default is 50, but this limit can be raised or lowered with the -n switch. Specifying a date range, however, turns off this limit; if you ask for the log messages in a date range, you will get all the log messages matching your criteria in that range.
Specify the maximum number of log messages to display. The default is 50 lines.
This switch can be combined with the --tail and --follow options to approximate an output similar to the Unix tail command with -n and -f switches.
Display the last log messages matching the given criteria. Similar to using the Unix 'tail' command on a log file. Defaults to retrieving the last 50 messages, which can be increased or decreased using the -n switch.
After the initial log messages have been displayed, the --follow switch causes heliosx_logger_hires_search to remaining running, displaying any new log messages that meet the given criteria. This option is similar to the -f switch of the Unix 'tail' command.
The --follow switch is incompatible with the sort order set to descending (--sort=desc).
Specify the order in which the log messages matching the given criteria are displayed, either ascending date or descending date order.
You cannot specify --sort=desc with the --follow option, for obvious reasons.
Display only log messages logged by services on a particular host.
Display only log messages logged by a particular PID. To properly isolate messages from a specific PID on a specific host, use with the --hostname option.
Display only the log messages logged for a particular jobid.
Display only the log messages logged for jobs belonging to a particular jobtype.
Display only the log messages logged by a particular service. This will include NOTICE messages logged by the service agent daemon; if you want to limit the messages to those associated with a particular job, use --service with the --jobtype switch.
Display only log messages of a given priority. The priority names are:
EMERG - Emergency
ALERT - Alert
CRIT - Critical
ERR - Error
WARNING - Warning
NOTICE - Notice
INFO - Informational
DEBUG - Debug
To search for log messages of multiple, specific priorities, separate them on the command line by spaces or specify multiple --priority options.
Andrew Johnson, <lajandy at cpan dot org>
Copyright (C) 2015 by Logical Helion, LLC.
This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. See the included LICENSE file for details.
This software comes with no warranty of any kind.
To install HeliosX::Logger::HiRes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HeliosX::Logger::HiRes
CPAN shell
perl -MCPAN -e shell install HeliosX::Logger::HiRes
For more information on module installation, please visit the detailed CPAN module installation guide.