Download the PHP package stackify/logger without Composer
On this page you can find all versions of the php package stackify/logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package logger
Stackify PHP Logger
Standalone Stackify PHP PSR-3 Logger.
- Errors and Logs Overview: http://support.stackify.com/errors-and-logs-overview/
- Sign Up for a Trial: http://www.stackify.com/sign-up/
PHP Logging Framework Integrations
- Monolog Handler: https://github.com/stackify/stackify-log-monolog
- log4php Appender: https://github.com/stackify/stackify-log-log4php
Installation
Install the latest version with composer require stackify/logger
Requirements
- Stackify PHP Logger ^2.0 works with PHP 7.1 or above.
- Stackify PHP Logger ^1.0 works with PHP 5.3 or above.
Installation with Linux Agent
This is the suggested installation option, offering the best logging performance.
Installation without Linux Agent
This option does not require the Stackify Agent to be installed because it sends data directly to Stackify services. It collects log entries in batches, calls curl using the function, and sends data to the background immediately []. This will affect the performance of your application minimally, but it requires permissions to call inside the PHP script and it may cause silent data loss in the event of any network issues. This transport method does not work on Windows. To configure ExecTransport you need to pass the environment name and API key (license key):
Optional Settings
Proxy
- ExecTransport supports data delivery through proxy. Specify proxy using libcurl format:
<[protocol://][user:password@]proxyhost[:port]>
Curl path
- It can be useful to specify destination path for ExecTransport. This option is set to 'curl' by default.
Log Server Environment Variables
- Server environment variables can be added to error log message metadata. Note: This will log all system environment variables; do not enable if sensitive information such as passwords or keys are stored this way.
Configuration Settings
- This allow users to override default settings of the logger (Masking Request Variables, Session, Cookie or Updating connection properties to different Transports etc.)
-
Note - By default capturing raw post data
(e.g. file_get_contents("php://input"))
and$_POST
variables areDISABLED
by default- To enable you can set the following options to
true
CapturePostVariables
-Boolean
- Capture$_POST
variablesCaptureRawPostData
-Boolean
- Capturephp://input
stream data(e.g. file_get_contents("php://input"))
- To enable you can set the following options to
- Note - For the
Whitelist/Blackist
setting. Anythingfalsy
(null
,false
,array()
etc. - Refer to php empty function checking) will be considered asDo Not Track
- No variable data will be processed.
Logger Level
Transport Level
- This applies to all the transports
(ExecTransport, CurlTransport, AgentTransport, AgentSocketTransport)
Available Options:
Server Variables
CaptureServerVariables
-Boolean
- Capture$_SERVER
variablesCaptureServerVariablesWhitelist
-Array
orComma-delimited string
- Whitelist$_SERVER
attributesCaptureServerVariablesBlacklist
-Array
orComma-delimited string
- Mask$_SERVER
attributes (e.g.attribute => 'X-MASKED-X'
)Get Variables
CaptureGetVariables
-Boolean
- Capture$_GET
variablesCaptureGetVariablesWhitelist
-Array
orComma-delimited string
- Whitelist$_GET
attributesCaptureGetVariablesBlacklist
-Array
orComma-delimited string
- Mask$_GET
attributes (e.g.attribute => 'X-MASKED-X'
)Post Variables
CapturePostVariables
-Boolean
- Capture$_POST
variablesCapturePostVariablesWhitelist
-Array
orComma-delimited string
- Whitelist$_POST
attributesCapturePostVariablesBlacklist
-Array
orComma-delimited string
- Mask$_POST
attributes (e.g.attribute => 'X-MASKED-X'
)Session Variables
CaptureSessionVariables
-Boolean
- Capture$_SESSION
variablesCaptureSessionVariablesWhitelist
-Array
orComma-delimited string
- Whitelist$_SESSION
attributesCaptureSessionVariablesBlacklist
-Array
orComma-delimited string
- Mask$_SESSION
attributes (e.g.attribute => 'X-MASKED-X'
)Error Headers
CaptureErrorHeaders
-Boolean
- CaptureHEADER
attributes available in$_SERVER
variableCaptureErrorHeadersWhitelist
-Array
orComma-delimited string
- WhitelistHEADER
attributes in$_SERVER
variableCaptureErrorHeadersBlacklist
-Array
orComma-delimited string
- MaskHEADER
attributes in$_SERVER
variable (e.g.attribute => 'X-MASKED-X'
)Error Cookies
CaptureErrorCookies
-Boolean
- Capture$_COOKIE
variablesCaptureErrorCookiesWhitelist
-Array
orComma-delimited string
- Whitelist$_COOKIE
attributesCaptureErrorCookiesBlacklist
-Array
orComma-delimited string
- Mask$_COOKIE
attributesCapture Raw Post Data
CaptureRawPostData
-Boolean
- Capturephp://input
stream data(e.g. file_get_contents("php://input"))
Debug Settings
Debug
-Boolean
- Enable DEBUG in the loggerDebugLogPath
-String
- A qualified path for the log file produced during debug or errorAgent Transport Settings
Protocol
-String
- Protocol can betcp
orudp
Host
-String
- Server HostnamePort
-Numeric
- PortSocketTimeoutConnect
-Numeric
- Connection Request TimeoutSocketTimeoutWrite
-Numeric
- Connection Write TimeoutSocketMaxConnectAttempts
-Numeric
- Connection AttemptsAgent Socket Transport Settings
DomainSocketPath
-String
- Stackify Agent unix socket pathAPI or Curl Exec Socket Transport Settings
ApiBaseUrl
-String
- Stackify API base urlApiCallLogsEndpoint
-String
- Stackify API Call Logs endpointApiMaxTimeout
-Numeric
- Stackify API Call Max TimeoutApiVersionHeader
-String
- Stackify API Version Header
Troubleshooting
If transport does not work, try looking into file (if it is available for writing). Errors are also written to global PHP error_log. Note that ExecTransport does not produce any errors at all, but you can switch it to debug mode:
You can set it also on the Logger
level. Setting the Debug
and DebugLogPath
Real User Monitoring (RUM)
Real user monitoring injects a script tag containing the RUM JS that is responsible for capturing information about the http requests on the browser. This approach is manual and needs to be configured.
RUM - Setup
RUM - Application
License
Copyright 2019 Stackify, LLC.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
All versions of logger with dependencies
psr/log Version ^1.0 | ^2.0 | ^3.0
guzzlehttp/psr7 Version ^1.9.1 || ^2.4.5
php-http/socket-client Version ^1.4 | ^2.0
php-http/message Version ^1.7
php-http/message-factory Version ^1.1
psr/http-message Version ^1.0