Justin Pryzby <pry...@telsasoft.com> writes: > On Wed, Jan 22, 2020 at 02:34:57PM +0900, Michael Paquier wrote: >> From patch 0003: >> /* >> + * Indent multi-line DETAIL if being sent to client (verbose) >> + * We don't know if it's sent to the client (client_min_messages); >> + * Also, that affects output to the logfile, too; assume that it's >> more >> + * important to format messages requested by the client than to make >> + * verbose logs pretty when also sent to the logfile. >> + */ >> + msgprefix = elevel==INFO ? "!\t" : ""; >> Such stuff gets a -1 from me. This is not project-like, and you make >> the translation of those messages much harder than they should be.
> I don't see why its harder to translate ? The really fundamental problem with this is that you are trying to make the server do what is properly the client's job, namely format messages nicely. Please read the message style guidelines [1], particularly the bit about "Formatting", which basically says "don't": Formatting Don't put any specific assumptions about formatting into the message texts. Expect clients and the server log to wrap lines to fit their own needs. In long messages, newline characters (\n) can be used to indicate suggested paragraph breaks. Don't end a message with a newline. Don't use tabs or other formatting characters. (In error context displays, newlines are automatically added to separate levels of context such as function calls.) Rationale: Messages are not necessarily displayed on terminal-type displays. In GUI displays or browsers these formatting instructions are at best ignored. regards, tom lane [1] https://www.postgresql.org/docs/devel/error-style-guide.html