]> git.lyx.org Git - features.git/commit
lyx2lyx: prefix warning messages with "lyx2lyx"
authorScott Kostyshak <skostysh@lyx.org>
Tue, 8 Mar 2022 16:53:10 +0000 (11:53 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Tue, 8 Mar 2022 16:57:04 +0000 (11:57 -0500)
commitae31e1695268347de373eedf187523ac5736b438
tree8761b091143f42c65d73f5ad96a38dfcb38c6ae1
parentd15a96d93d0af675a88cfa90ae1a16f161914385
lyx2lyx: prefix warning messages with "lyx2lyx"

Both lyx2lyx and LyX write output to the terminal, and it's helpful
to know which messages are coming from lyx2lyx. For example, before
this commit if we opened a document in LyX that has a newer file format than
lyx2lyx can deal with, we see the following output in the terminal:

  Warning: 619: Format not supported.
  Warning: Quitting.
  Error: Document format failure

The first two lines (the warnings) are output from lyx2lyx, and the
third is output by LyX. This output was particularly confusing
because I first thought "LyX tries to quit if the document is too
new?", but in fact LyX still stays open; it just doesn't open the
document. After this change, the output is now the following:

  lyx2lyx warning: 619: Format not supported.
  lyx2lyx warning: Quitting.
  Error: Document format failure
lib/lyx2lyx/LyX.py