IOPLEX
Communications Software
Plexcel for PHP - Active Directory PHP Integration
plexcel_new
plexcel_status
plexcel_find_authorities_by_domain
plexcel_get_authority
plexcel_get_domain
plexcel_log
plexcel_preamble
plexcel_authenticate
plexcel_sso
plexcel_logon
plexcel_logoff
plexcel_accept_token
plexcel_is_member_of
plexcel_set_password
plexcel_change_password
plexcel_gen_service_keytab
plexcel_search_objects
plexcel_get_account
plexcel_add_object
plexcel_modify_object
plexcel_delete_object
plexcel_set_attrdefs
plexcel_get_attrdefs
plexcel_set_conv_attrdefs

plexcel_log

Printer Friendly Format

Synopsis

bool plexcel_log(int $log_level, string $msg)

Description

The plexcel_log function writes a message to the Plexcel log file provided that the internal log level allows it.

The $log_level parameter is an integer representing the level and category of the message. This value is compared to the corresponding plexcel.log.level property set in /etc/php.d/plexcel.ini or in the php.ini file.

A $log_level of 1 is the simplest way to write a message to the Plexcel log file. For more advanced logging, the category may also be specified as described below.

The lower 8 bits of the $log_level is the level. The upper 24 bits is the category. If the category of either the $log_level value or the internal plexcel.log.level value is 0 , then only the priority is considered.

The following table lists category values and their meaning.

Category Value Description
SIG 0x00001000 Signals
IO 0x00002000 Socket I/O
NET 0x00004000 Networking
MEM 0x00008000 Memory Management
SEC 0x00010000 Security (not from routines internal to Kerberos libraries)
LOCK 0x00020000 Locking
SEGV 0x00040000 Segfault handler (requires gdb)
DNS 0x00080000 DNS querying (not from routines internal to Kerberos or LDAP libraries)
HTTP 0x00100000 Currently not used by Plexcel functions
SMB 0x00200000 SMB/CIFS communication
DCE 0x00400000 DCE/RPC communication
LDAP 0x00800000 LDAP communication (not from routines internal to LDAP library)

The $msg parameter is the message to be written to the log.

Returns

The plexcel_log function returns FALSE if an error occurs. Otherwise, TRUE is returned.

Example

The following PHP fragment writes the QUERY_STRING of a request to the Plexcel log file provided that the plexcel.log.level is less than or equal to 1 .

plexcel_log(1, 'test.php request params: ' . $_SERVER['QUERY_STRING']);
Logging request parameters to the Plexcel log file
© 2008 IOPLEX Software | Contact Us | Policies