Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tips for clearer logging of errors

    Is there an option within Stata to more clearly log errors when they occur? As an example, I recently saw this in my log:

    file //path/to/file/my_file.dta not found
    r(601); t=1.29 12:28:30
    All I really want is for Stata to also print the word "Error" to the log when an error occurs. This would make it much easier to run a search against the log to quickly find errors. Should I instead search for "r("? Looking at the documentation, it appears general commands store results in r(). In practice, however, if an r() shows up in my logs it tends to be reporting an error. Thanks!

  • #2
    Funnily enough, one of applications I use to view logs (Glogg) interprets the search "r(" - without quotes - as the start of a regex pattern.

    Comment

    Working...
    X