module Syslog

Defined in:

syslog.cr

Class Method Summary

Class Method Detail

def self.alert(message : String, facility : Facility | Nil = nil) : Nil #

Writes an alert syslog message with an optional facility.


[View source]
def self.close : Nil #

Closes the current logger. Useful for shard libraries where the prefix may be unloaded.


[View source]
def self.critical(message : String, facility : Facility | Nil = nil) : Nil #

Writes an critical syslog message with an optional facility.


[View source]
def self.debug(message : String, facility : Facility | Nil = nil) : Nil #

Writes an debug syslog message with an optional facility.


[View source]
def self.emergency(message : String, facility : Facility | Nil = nil) : Nil #

Writes an emergency syslog message with an optional facility.


[View source]
def self.error(message : String, facility : Facility | Nil = nil) : Nil #

Writes an error syslog message with an optional facility.


[View source]
def self.facility : Facility #

Returns the loggers default facility.


[View source]
def self.facility=(facility : Facility) : Nil #

Sets the loggers default facility.


[View source]
def self.info(message : String, facility : Facility | Nil = nil) : Nil #

Writes an info syslog message with an optional facility.


[View source]
def self.log(priority : Priority, message : String, facility : Facility | Nil = nil) : Nil #

Writes a message with a priority and facility.


[View source]
def self.mask : UInt16 #

Returns the loggers mask.


[View source]
def self.mask=(mask : Int) : Nil #

Sets the loggers mask.


[View source]
def self.notice(message : String, facility : Facility | Nil = nil) : Nil #

Writes an notice syslog message with an optional facility.


[View source]
def self.options : Options #

Returns the loggers options.


[View source]
def self.options=(options : Options) : Nil #

Sets the loggers options.


[View source]
def self.prefix : String #

Returns the string to be prefixed to log messages.


[View source]
def self.prefix=(prefix : String) : Nil #

Sets the string to be prefixed to log messages.


[View source]
def self.reset_defaults : Nil #

Resets all the loggers options to their defaults.


[View source]
def self.setup(prefix : String, facility : Facility, options : Options, mask : Int) : Nil #

Sets all the loggers options at once. This is more efficient when changing many settings.


[View source]
def self.warning(message : String, facility : Facility | Nil = nil) : Nil #

Writes an warning syslog message with an optional facility.


[View source]