I have found the option in Intellij to read log files of my program and show them where the console is shown: https://www.jetbrains.com/help/pycharm/setting-log-options.html A very cool feature, as I can have filtered output of some of my logs in a file and then read them in this second console.
However Intellij seems to randomly decide which of those lines are warnings and which of them are just info, therefore randomly marking some of them red. I guess I need to format the log lines in a specific way, but I cannot figure out how. The default Formatter used by the java.util.logging.FileHandler is some XMLFormat that is unreadable and the SimpleFormatter is not recognized correctly by intellij as you can see in the following picture where the only line not red is the actual only line that should be red.
Question: Which log format is expected by Intellij to correctly display my logs?
Related
I was working on a Vuejs project. So this morning when I opened the project it wasn't compiling anymore and it was reporting an error in one of the components. When opening the component, this message appeared in the VSCode editor "The file will not be displayed in the editor because it is either binary, very large or uses an unsupported text encoding." Clicking on open anyway appears a lot of code with strange symbols as shown in the image. When I try to open the file in another editor, the same problem also happens, but the symbols change. I would like to know what might have happened and if there is a way to recover my file?
Looks like your file is corrupt. Restore from a backup, or re-pull from git.
I create React Native projects with react-native init and it outputs many lines in my console. Often there will be a bunch of warnings or errors that I want to work through one at a time, and would like to keep the logged output in a separate file.
What I've Tried:
I just copy-pasted the logged output into a file in VsCode. The problem is that it pastes as plain text by default, and doesn't have the informative colors that the console has (red for error, yellow for warning, etc).
What I Want To Know:
Is there a way I can format the text (ie. "Select Language Mode") in VsCode such that it have those informative colors? And is there a way I can automatically re-direct my console output to a file with this language mode preferences automatically set?
We have a WPF application which can perform either a report preview or a report print.
Both requests use the same code.
Call the report service which gets the report from Microsoft Report Services.
Convert the report into the desired format (in this case PDF).
Then return the report as a byte array.
The result is then written to a temporary file as a binary stream, and either popped into a window to preview or start a Process to print.
In both cases the temporary file is passed.
Print Preview works flawlessly! But Print Report will print with all occurances of 'ti' disappearing. I see there is a printer escape sequence of ESC t NUL/SOH and I assume that if, for some reason, an escape character gets into that stream that ti will result in an ignored print sequence. Thus the missing characters.
My first question is if anyone has ever experienced this with generated PDF reports?
My second question (obviously) is if anyone knows of a utility I can use to view the binary data in the file being printed, to see what is in the file just before every 'ti' sequence?
After a great deal of searching I came across a post on the Adobe forum that states that version 8 had a bug where it was not printing character combinations. Once I dug deeper it seems that it has returned and the suggested workaround fixed our issue.
Workaround: Do a print as image.
Adobe seems to be unable to do the most basic of what their software must do, print the exact content!
Answer for your second question:
First, do one of the following two things:
Set the Windows print spooler properties to not delete printed jobs.
Pause the target print queue.
Then, grab the spool file from the Windows printspool directory (which location that is you can find out by looking at the (right-click) 'Properties...' dialog of the 'Printers and Faxes' folder).
I realize this is an old post but I wanted to add some updated info from the above comment stating that it's a problem with Acrobat 8. We are using Acrobat 10.1.6 and still have the same problem. From what I've read, it's a problem with the adobe product itself. The only real fix I've seen (actually work around) is to print as an image. LAME
Surprisingly this bug is still there in 2021. Adobe cannot be relied upon printing documents properly. This takes away all the allure of features it had if it cannot do the most basic stuff it is required for.
Printing as image reduces the quality and blur the document.
Simply open the document with Safari or Chrome and print from there. E
I had a similar problem while printing directly from the firefox (acrobat reader within). I downloaded the file and then printed. The problem was solved.
I have a msbuild script that includes creation of a few PDF's using PDF creator. It's the Convert2PDF.vbs that's being used, converting doc's to PDF's, and a while ago it stopped working and none seemed to take the time to fix it. So I looked into it and by debugging the script I found that it was in fact a document for which Word presented a dialog with information about contents being larger than the margins. This halted the entire thing since none could press this dialog during the auto-build.
So what I wonder is if there is a way to tell the PDF Creator script, via cmd line arguments or by altering the script, to suppress these kinds of warnings and just continue with conversion?
I solved this by creating a script in word that suppressed warnings if the given document resided within the build folder specified.
I have a question but not sure it is possible or not.
I am using apache logger for my logging which creates a log file which works fine with no issues. My question is when I open the log file I get the different messages like messages with INFO,DEBGU,ERROR etc.
But I want to see the error message in red color in text in my logger file. Is this possible?
That way, if someone opens my log file and something is there in red they can clearly guess that it is an error message..
Is this possible?
I would really appreciate if someone can respond.
Thanks, Swati
Which text editor do you use to open the log file? Notepad, Notepad++, UltraEdit, SlickEdit, or one of the many, many text editors out there? By default, you can't. There might some text editors that allows you to write some kind of extension or plugin to provide custom syntax highlighting. That's an option you take.
Having said that, if some one else open using his/her text editor, and without your plugin, they of course won't see the red color coded lines.
I'll be honest and say I know nothing about the apache logger you're talking about.
Log files are typically plain text, purely for the reason that other programs can parse them. Will you use HTML, or RTF to markup the log? If so, what happens if you have a programmer like me who does not care about formatting?
Short Answer: yes it's possible.
Long Answer: but you'll have to add the appropriate markup, and you'll have to assume the user has the correct application to view said markup. In the end, this might cause more problems than its worth: If your end user is a programmer reading the log file, then formatting is usually superfluous. If your end user is a normal non-technical person, consider other means of notifying them of errors.
You could just use a logviewer.