New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

openlss/func-log

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openlss/func-log

Logging functions, also handles CLI output

Source
Packagist
Version
dev-0.0.x-dev
Version published
Maintainers
2
Created
Source

openlss/func-log

Logging functions; also handles CLI output

The logger will automatically open and close its log file without any extra setup by the user

Usage

dolog('This is an info message');
dolog('This is an ERROR',LOG_ERROR);
dolog('This is a warning',LOG_WARN);

COnfiguration

The log package ships with the following configuration

$config['log']['level'] = LOG_INFO;
$config['log']['file'] = false;
$config['log']['format'] = '[%s] %s - %s'; //%s - date %s - level %s - message
$config['log']['date_format'] = 'm/d/Y g:i:sA';
  • $config['log']['level'] The level to log at, if a message is higher than the level it will be discarded
  • $config['log']['file'] The file to log to, this must be writable by the PHP program
  • $config['log']['format'] A sprintf style format of the log message
  • %s Log level
  • %s Date of the message
  • %s The actual message
  • $config['log']['date_format'] A date format compatible with PHP's date() function

Reference

(int bool) dolog($msg,$level=LOG_INFO)

This will log the desired message at the desired level to the configured log file.

  • $msg The message to be logged
  • $level The level to be logged
  • LOG_ERROR Error message
  • LOG_WARN Warning message
  • LOG_NOTICE Notice message
  • LOG_INFO Informational message
  • LOG_DEBUG Debugging information

FAQs

Package last updated on 09 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts