snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.09k stars 3.18k forks source link

Can't access laravel logs #14080

Open jeffjoseph opened 10 months ago

jeffjoseph commented 10 months ago

Debug mode

Describe the bug

I have triedphp artisan log:clear but it showed an error saying

There are no commands defined in the "log" namespace.

after that it shows the logs in scrambled way looks like chinese characters

Reproduction steps

1.run "php artisan log:clear" from the directory of snipe it

Expected behavior

need to see laravel logs

Screenshots

scrambled laravel logs

Screenshot (3)

error in powershell

Screenshot 2023-12-29 103804

Snipe-IT Version

v6.2.3

Operating System

windows server 2012 standard

Web Server

iis 8

PHP Version

7.4.3

jeffjoseph commented 10 months ago

Please help me ,is there any way to undo this.

marcusmoore commented 10 months ago

Hi @jeffjoseph,

Are you able to log into the application ok? If you don't need those logs (if you're not looking for something specific) you can delete that file (laravel.log) and it will be recreated when Laravel logs a new entry.

Why it is logging in a different language is an interesting issue though. I would try to delete the log and then do an action that will generate log entries and see if they are in the language you expect. Visiting the dashboard should generate entries if you're in debug mode. You can follow the steps in at the top of this page to turn debug mode on. Remember to carefully follow the steps for turning it back off after you're done.

php artisan log:clear isn't a valid command so the error you're getting makes sense.