Jump to content

Search the Community

Showing results for tags 'logging'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 2 results

  1. I love Alfred but I struggled at first to troubleshoot my workflow scripts due to difficulty finding a way to debug. I've seen posts mentioning writing logs to an external file but that seemed hack-y, especially since Alfred includes a debug console. If you'd like to use the console to debug your scripts, I found the following very useful. It would be great if there were a mention of this in the docs: To show script output in the debug console, print (or echo or put, etc) the output to stderr instead of stdout. In a Bash script: >&2 echo "Log this output to the console" In a Python script: import sys sys.stderr.write("Log this to the console") For other languages, look for an equivalent method that allows you to log to stderr.
  2. The new debugger is an extremely welcome addition, as Alfred's previous utter silence in the face of errors was very frustrating when trying to debug errors not obviously located within the workflow itself. However, I'd love to see its scope expanded somewhat to make it a useful workflow debugger as well as an Alfred one, so it's no longer necessary to also implement logging/debugging within workflows themselves (which is busywork that distracts from the important, fun and value-adding business of creating workflow functionality). Because Alfred currently only displays the workflow output if the workflow exits improperly, it's no help debugging non-fatal errors (mistakes in logic; exceptions logged but caught; incorrect, but still well-formed XML), so workflow authors will still need to bake their own logging solution to track down and squash such errors. If Alfred always displayed workflow output to stderr, regardless of exit status, this would save workflow developers a fair bit of coding busywork and/or time hand-holding less technically-inclined users through the somewhat arcane process of digging a log file out of ~/Library or running the workflow from Terminal. Showing the received XML in the case of an XML Parse Error would also be very helpful: the row and col numbers aren't particularly helpful without it.
×
×
  • Create New...