Not a developer? Go to MovableType.com

Documentation

Logging to the Activity Log

To create an entry in the Activity Log, use the following code sample:

MT->log({  
  message => "Something happened.",
  class => 'system',
  level => MT::Log::DEBUG(), 
});

MT->log Properties

  • message - The message to enter into the log.
  • class - The type of log entry. In most cases, the default “system” value is sufficient. The others are used to additional log information about content created in the system.
    • system (default)
    • comment
    • page
    • ping
  • level - The log level of nature of the log entry. This is used to differentiate between informational messages and errors.
    • MT::Log::INFO()
    • MT::Log::WARNING()
    • MT::Log::DEBUG()
    • MT::Log::SECURITY()
    • MT::Log::ERROR()
Back

Leave a Comment