Skip to content

Commit 232ade0

Browse files
committed
do not output message locally
1 parent f6a2835 commit 232ade0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/BuffLog/BuffLog.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ static public function getLogger()
4040
protected static function configureInstance()
4141
{
4242

43-
if (class_exists("\DDTrace\GlobalTracer") && getenv("ENVIRONMENT") !== "local") {
43+
if (class_exists("\DDTrace\GlobalTracer")) {
4444
self::$hasGlobalTracer = true;
4545
} else {
46-
error_log("Tip #1: Can't find \DDTrace\GlobalTracer class. Did you install the Datadog APM tracer extension? It will allow you to have logs enriched with traces making troubleshooting easier.");
47-
error_log("Tip #2: If you run a cli mode service (such as a worker), did you set the DD_TRACE_CLI_ENABLED env variable?");
46+
if (getenv("ENVIRONMENT") !== "local") {
47+
error_log("Tip #1: Can't find \DDTrace\GlobalTracer class. Did you install the Datadog APM tracer extension? It will allow you to have logs enriched with traces making troubleshooting easier.");
48+
error_log("Tip #2: If you run a cli mode service (such as a worker), did you set the DD_TRACE_CLI_ENABLED env variable?");
49+
}
4850
}
4951

5052
// @TODO: We could potentially use the Kubernetes downward API to

0 commit comments

Comments
 (0)