NAME

heliosx_logger_hires_search - search the Helios high resolution log

SYNOPSIS

# 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 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

DESCRIPTION

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.

RUN OPTIONS

--start-date="YYYY-MM-DDTHH24:MI:SS"

--end-date="YYYY-MM-DDTHH24:MI:SS"

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.

-n, --lines=number_of_lines

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.

--tail

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.

--follow

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).

--sort=asc|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.

SEARCH CRITERIA OPTIONS

--hostname=name_of_host

Display only log messages logged by services on a particular host.

--pid=process_id

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.

--jobid=jobid

Display only the log messages logged for a particular jobid.

--jobtype=jobtype_name

Display only the log messages logged for jobs belonging to a particular jobtype.

--service=service_name

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.

--priority=priority_name

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

AUTHOR

Andrew Johnson, <lajandy at cpan dot org>

COPYRIGHT AND LICENSE

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.

WARRANTY

This software comes with no warranty of any kind.