Closed joefallon closed 9 years ago
I was told in IRC, that there's a pull request for it. It'll add the ability to enable/disable the error log escaping. It'll land soon hopefully.
Yeah it's pretty annoying/ugly. Maybe it's #4415?
It's such an obvious and huge difference with PHP. I cannot imagine a set of circumstances would allow all those visible "\n's" to seem reasonable. Literally every other character is a backslash-n. People cat and and tail error logs all of the time. It just boggles the mind.
In fairness, we use this internally because it makes the logs easier to machine process when each error occurs on one line. I've never had a serious problem reading the logs, I always just pipe to sed to replace newlines as appropriate. Having an option sounds like a good compromise though.
I am ok with error logs being on one line. Apache logs have been one line forever and they are not littered with backslash-n's. PHP error logs are not littered either. Millions of average PHP dev's don't want to use sed to read logs.
Well, we log backtraces that don't really make sense to view on one line, hence the \n characters. As I've said I'm not against the option to turn that off, but I think this solution allows the finer detail of the backtrace without sacrificing the machine readability of a log. Also anyone who writes code full time really shouldn't be complaining about having to type out cat error.log | sed 's/\\n/\n/g'
every now and again...
Dude, seriously, the world is bigger than the people in your office, even if it is a big office. You released HHVM to the world, it's gone mainstream. You gotta accept that and deal. For non-edge cases, make it like PHP. You're not going to convince us that something like "\n\n\nline\n\n90\nat colum 67\n function..." in my log files is ok.
@paulbiss: By the way, what is the reason for \n
? That doesn't make any sense. Even *
would make more sense imho.
Also anyone who writes code full time really shouldn't be complaining about having to type out ...
That's really not an argument, is it...
I know, right? Seriously.
@Majkl578 it was just a choice, I didn't make it but I think it makes some logical sense, I see \n and I think newline. It wasn't an argument, but this has gotten incredibly petty, and I'm running out of patience. We're planning to take the PR and we hope it makes people's experiences better.
@joefallon you need to calm down. I've already said we've heard your suggestion and we're happy to add the option. You suggested that the feature had no purpose and I've done my best to demonstrate how it can be useful. We care a lot about our community and have put a lot of effort into supporting the vast array of requests we regularly receive.
The project is open source, and though we do use it heavily at facebook we have gone so far as to have an entire team devoted to working on problems specific to our community. For issues you're passionate about you should strongly consider contributing. I've not seen any pull-requests from you.
@paulbiss, I'm actually discouraged by the "ANYONE should be willing to walk on eggshells around a less than ideal setup by typing something very complex that not every coder thought of or even knows." It sounds way too much like how some misguided people recommend "getting along with" abusive spouses. [EDIT: That said, I greatly appreciate your efforts and from running my own popular open source project for years, I know exactly the frustrations of which you speak!]
After stepping back and thinking about this from a higher level I realized that we probably shouldn't be using it on any systems until 6 months after a version of it lands in an Ubuntu LTS release, minimum. After doing this for a long time, I should have known, and it was silly of me to think otherwise. We have a policy for stuff like this and it's there for a reason. I don't know what I was thinking. Perhaps this issue should be closed as, "working as intended".
@hopeseekr: My apologies, we're going to have a switch for this behavior, it wasn't my intention to imply we weren't going to do anything about it.
@joefallon: We'll close this once the patch goes in, we plan to support both the current behavior and the requested behavior going forward via an ini option.
Thank you. :)
Tons of visible newline characters litter the error logs. This makes it impossible to "cat" or "tail" the logs and easily be able to read them like in PHP.