com.webos.pmlogd

API Summary

It is logging daemon implementation of webOS Open Source Edition (OSE).

Overview of the API

(click to expand)

The syslogd implementation is per RFC 3164 (The BSD syslog Protocol). This implementation is a subset of that functionality, intended to efficiently address the needs for webOS OSE embedded devices.

  • it does not support remote logging (not needed);
  • it only supports the standard datagram socket on port 514;
  • it does not support /etc/syslog.conf or standard filtering/redirection.

Additional features are:

  • support for RFC 3339-style timestamps;
  • support for advanced file buffering + rotation configuration;
  • support for custom filtering/redirection.

Open All


backuplogs

Description

Combine all the log files present in /var/log into /mnt/lg/cmn_data/var/log/ directory and create a tar archive previous_boot_logs.tar.gz.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredboolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. 

Example

Example :

# luna-send -n 1 luna://com.webos.pmlogd/backuplogs '{}'


forcerotate

Description

Force a rotation of the log file. So /var/log/messages gets renamed to /var/log/messages.X and original log become clean. Notify rotation subscribers with log 'filename' in payload.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredboolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. 
errorTextOptionalString

errorText contains the error text "Log rotation failed" if the method fails. The method will return errorText only if it fails.

Example

Example :

# luna-send -n 1 luna://com.webos.pmlogd/forcerotate '{}'


subscribeOnRotations

Description

Add a subscriber to the log rotation. When there is log rotation, daemon will notify the subscriber with the rotated log file name. 

Currently only one subscriber is supported and the subscriber should manage the rotated log file.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. 
subscribedRequiredBoolean

Indicates if subscribed. Possible values are:

  • true - Is subscribed 
  • false - Not subscribed
errorTextOptionalString

errorText contains the error text if the method fails. The method will return errorText only if it fails.

Subscription Returns

Name

Required

Type

Description

filepathRequiredString

Filepath to rotated log file.

Example

Example :

# luna-send -f -n 1 luna://com.webos.pmlogd/subscribeOnRotations '{}'


Except as noted, this content is licensed under Creative Commons Attribution 4.0 and sample code is licensed under Apache License 2.0.