Class: Phidgets::Log

Inherits:
Object
  • Object
show all
Defined in:
ext/phidgets/phidgets_log.c

Constant Summary collapse

CRITICAL =
INT2FIX(PHIDGET_LOG_CRITICAL)
ERROR =
INT2FIX(PHIDGET_LOG_ERROR)
WARNING =
INT2FIX(PHIDGET_LOG_WARNING)
DEBUG =
INT2FIX(PHIDGET_LOG_DEBUG)
INFO =
INT2FIX(PHIDGET_LOG_INFO)
VERBOSE =
INT2FIX(PHIDGET_LOG_VERBOSE)

Class Method Summary collapse

Class Method Details

.addSource(source, level) ⇒ Object

Adds a source to the Phidget logging system. This is useful for declaring a source and setting its log level before sending any messages.



17
# File 'ext/phidgets/phidgets_log.c', line 17

VALUE ph_log_add_source(VALUE self, VALUE source, VALUE level);

.disableObject

Disables logging.



6
# File 'ext/phidgets/phidgets_log.c', line 6

VALUE ph_log_disable(VALUE self);

.disableRotatingObject

Disables automatic rotation of the log file.



16
# File 'ext/phidgets/phidgets_log.c', line 16

VALUE ph_log_disable_rotating(VALUE self);

.enable(log_level, output_file) ⇒ Object

Enables logging.



5
# File 'ext/phidgets/phidgets_log.c', line 5

VALUE ph_log_enable(VALUE self, VALUE level, VALUE output_file);

.enableRotatingObject

Enables automatic rotation of the log file (the default).



15
# File 'ext/phidgets/phidgets_log.c', line 15

VALUE ph_log_enable_rotating(VALUE self);

.getLevelObject

Gets the log level for the phidget22 source.



7
# File 'ext/phidgets/phidgets_log.c', line 7

VALUE ph_log_get_level(VALUE self);

.getRotatingObject

Gets the current log rotation parameters.



13
# File 'ext/phidgets/phidgets_log.c', line 13

VALUE ph_log_get_rotating(VALUE self);

.getSourceLevel(source) ⇒ Object

Gets the log level of the specified log source.



18
# File 'ext/phidgets/phidgets_log.c', line 18

VALUE ph_log_get_source_level(VALUE self, VALUE source);

.getSourcesObject

Gets an array of log sources in the system.



20
# File 'ext/phidgets/phidgets_log.c', line 20

VALUE ph_log_get_sources(VALUE self);

.isRotatingObject

Determines if the library is automatically rotating the log file.



12
# File 'ext/phidgets/phidgets_log.c', line 12

VALUE ph_log_is_rotating(VALUE self);

.log(log_level, msg) ⇒ Object

Appends a message to the log.



9
# File 'ext/phidgets/phidgets_log.c', line 9

VALUE ph_log_log(VALUE self, VALUE level, VALUE message);

.loge(file, line, function, source, log_level, msg) ⇒ Object

Writes a message to the Phidget library log from a specified source.



10
# File 'ext/phidgets/phidgets_log.c', line 10

VALUE ph_log_loge(VALUE self, VALUE file, VALUE line, VALUE function, VALUE source, VALUE level, VALUE message);

.rotateObject

Manually rotate the log file. This will only have an effect if automatic rotation is disabled and the log file is larger than the specified maximum file size.



11
# File 'ext/phidgets/phidgets_log.c', line 11

VALUE ph_log_rotate(VALUE self);

.setLevelObject

Sets the log level for all sources not prefaced with _phidget22.



8
# File 'ext/phidgets/phidgets_log.c', line 8

VALUE ph_log_set_level(VALUE self, VALUE level);

.setRotating(size, keep_count) ⇒ Object

Sets log rotation parameters.



14
# File 'ext/phidgets/phidgets_log.c', line 14

VALUE ph_log_set_rotating(VALUE self, VALUE size, VALUE keep_count);

.setSourceLevel(source, level) ⇒ Object

Sets the log level of the specified log source.



19
# File 'ext/phidgets/phidgets_log.c', line 19

VALUE ph_log_set_source_level(VALUE self, VALUE source, VALUE level);