Code Monkey home page Code Monkey logo

Comments (11)

arukompas avatar arukompas commented on June 10, 2024 1

@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.

arukompas avatar arukompas commented on June 10, 2024

hey @joukhar , please share the log file, and a screenshot of how it appears in Log Viewer.

from log-viewer.

joukhar avatar joukhar commented on June 10, 2024

@arukompas
Screenshot from 2024-03-04 10-01-55

from log-viewer.

arukompas avatar arukompas commented on June 10, 2024

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.

joukhar avatar joukhar commented on June 10, 2024

nah , it returns translated string from /lang/ar.json , and i used dd()

from log-viewer.

arukompas avatar arukompas commented on June 10, 2024

@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.

joukhar avatar joukhar commented on June 10, 2024
[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.

joukhar avatar joukhar commented on June 10, 2024

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.

arukompas avatar arukompas commented on June 10, 2024

@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.

joukhar avatar joukhar commented on June 10, 2024

You're right i tested it on vscode and it doesn't show proper arabic , the problem is in json requests

from log-viewer.

arukompas avatar arukompas commented on June 10, 2024

@joukhar awesome, thanks for confirming! 😃 closing

from log-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.