Comments (11)
@joukhar ok, but that's what I mean. The log message is logged as characters \u062d\u062f\u062b \u062e\u0637\u0623 \u0645\u0627
inside the api-requests.log
file, not as arabic unicode characters.
Log Viewer just displays whatever's inside the file and it should not do any kind of hex-to-unicode conversion because that would be misleading to what is actually logged in the file.
The issue is somewhere else, because it's not saving arabic characters into the log file itself. Perhaps the API itself is returning non-arabic characters (\u062d\u062f\u062b \u062e\u0637\u0623 \u0645\u0627
).
from log-viewer.
hey @joukhar , please share the log file, and a screenshot of how it appears in Log Viewer.
from log-viewer.
from log-viewer.
hey @joukhar , thanks for the screenshot. How about the log file itself? It could be that the content is stored in the log file like this, therefore there's nothing for the Log Viewer to do and it just displays the content inside the api-requests.log
file.
from log-viewer.
nah , it returns translated string from /lang/ar.json , and i used dd()
from log-viewer.
@joukhar could you share the contents of the storage/logs/api-requests.log
file?
So that I can reproduce it and see how I can fix it. I don't have any example files with arabic characters.
from log-viewer.
[2024-03-06 18:06:32] production.ERROR: Api Request {"URL":"PRIVATE","METHOD":"POST","USER_AGENT":"PRIVATE","IP":"PRIVATE","USER":"PRIVATE","REQUEST_BODY":{"id":"PRIVATE","answers":"PRIVATE","totalTime":44},"RESPONSE":"{\"success\":false,\"message\":\"\\u062d\\u062f\\u062b \\u062e\\u0637\\u0623 \\u0645\\u0627\"}","LOCALE":"ar"}
i use ai for this because im lazy to come with solution, it easy but u just need to convert readable text.
The Arabic text for "\u062d\u062f\u062b \u062e\u0637\u0623 \u0645\u0627" is "حدث خطأ ما".
from log-viewer.
you have a point there maybe json requests are the cause , i will try making a web and api request to the server with custom request logger middleware and i will reply with the result
from log-viewer.
@joukhar the easiest way is to just open your api-requests.log
file inside a text editor. If it does not contain arabic characters inside a simple text editor, then Log Viewer won't display them either. That's why I asked to share the log file itself, because all of this depends on whether the actual arabic characters exist inside the text file.
from log-viewer.
You're right i tested it on vscode and it doesn't show proper arabic , the problem is in json requests
from log-viewer.
@joukhar awesome, thanks for confirming! 😃 closing
from log-viewer.
Related Issues (20)
- UI issue HOT 4
- Download file not sending additional headers HOT 13
- Layout issues with more than 4 columns defined
- Log with name access-*.log showing "No results" HOT 1
- Malformed UTF-8 characters, possibly incorrectly encoded Error HOT 3
- Custom theme not working as advertised HOT 2
- Problem downloading logfiles from log viewer page HOT 2
- log-viewer visible by public, unauthorized users HOT 11
- Lots of raw HTML tags inside Stacktrace HOT 4
- Search is case sensitive for non English text HOT 2
- Bug HOT 5
- RuntimeException: A facade root has not been set. (related to log facade) HOT 2
- Blank Display HOT 2
- Error 500 | Undefined variable $selectedFileIdentifier HOT 1
- unserialize(): Error at offset 0 of 81 bytes HOT 3
- Arrays with numeric keys are not correctly displayed HOT 1
- Request failed with status code 500: Undefined array key 1 error when searching HOT 5
- Result not showing (Redis connection error) HOT 1
- Laravel 11: Authorizing Users on page load returns Null user and Unauthorized HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log-viewer.