Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

How can I know the real path for my monolog logs to read them from a controller? [closed]

$
0
0

I use monolog in my application to get logs on the actions of my users.

useractions:
            type: rotating_file
            path:  "%kernel.logs_dir%/useractions.log"
            level: info
            channels: [useractions]
            max_files:      60

So I get the actions of users in different .log files in /var/log/

I would like to read these logs directly on my application, and present them to users.

Is this possible?

I do not know the real path of the log file so I do not know how I can access it from a controller.

The path: "http://xxx/var/log/useractions.log" gives me :

No route found for "GET /var/log/useractions.log"

But "http://xxx/_profiler/open?file=var\log\useractions.log" works well


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>