Download the PHP package khalyomede/syslog without Composer

On this page you can find all versions of the php package khalyomede/syslog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package syslog

Syslog

PHP from Packagist Packagist Packagist

Log into your Syslog destination.

Summary

Prerequistes

Installation

In your project folder:

Examples of uses

All the examples can be found in the /example folder.

Example 1: logging into your log destination

Example 2: templatize your message for logging

Example 3: use a generic method for logging

If you do not want to pass through the class constants of LogLevel, you can provide a string instead:

Beware that the informational severity string equivalent is info.

Example 4: templatize when using the generic logging

Example 5: force the date before logging

Example 6: specify an indentifier for your next logs

The identifier will stick to your next logs. If you would like to clear it at a point, you can use:

It returns an instance of Khalyomede\Syslog so you can chain it with any other method.

Methods definitions

alert

Sends a message to the log destination with an alert severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

critical

Sends a message to the log destination with a critical severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

date

Force the log to be timestamped to a specific date.

Note

If you do not call this method at each log call, the date will be set to the time at which you call the sysloger.

debug

Sends a message to the log destination with a debug severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

deleteIdentifier

Reset the identifier to its empty value.

device

Set the name of the device that is sending the log. For more information, see the definition of this attribute on the Syslog RFC5424 documentation.

emergency

Sends a message to the log destination with an emergency severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

error

Sends a message to the log destination with an error severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

facility

Set the target plateform. For more information, see the definition of this attribute on the Syslog RFC5424 documentation.

host

Set the target log destination host.

Note

The value should be an IP or a valid domain.

identifier

Set an optional identifier to group your logs.

info

Sends a message to the log destination with an info severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

log

Log using an opt-in severity parameter. This has the same effect than any other others severity logging methods.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

notice

Sends a message to the log destination with a notice severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

port

Set the port of the log destination server address.

processus

Set the original processus that is responsible for this log. For more information, see the definition of this attribute on the Syslog RFC5424 documentation.

source

Set the original server that generated this log. For more information, see the definition of this attribute on the Syslog RFC5424 documentation.

warning

Sends a message to the log destination with a warning severity.

Note

The keys of the context should respect the following format: lower case, numbers, with underscores and periods only.

Exception

InvalidArgumentException:

LogicException:

RuntimeException:

Prototype ready

This class lets you extend its functionality to your needs without having to dive into the source code. For example:

For more information, check khalyomede/prototype documentation.


All versions of syslog with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
khalyomede/prototype Version 1.*
khalyomede/syslog-interface Version 1.*
psr/log Version 1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package khalyomede/syslog contains the following files

Loading the files please wait ....