Answers.Body: <p>Your plugin can keep its own log using <code>MyPlugin::log('Message', LogLevel::Error);</code>. A <code>log</code> method gets created automatically by extending BasePlugin. The plugin log will be located in <code>craft/storage/runtime/logs/</code> along with the default logs.</p>
  
  <p>As a side note: The log files can be watched from the command line using <code>tail -F /full/path/to/log/file</code> rather than having to constantly reload the log in a text editor. Although apparently some text editors also support live updates as well.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-10T06:03:46.423Z
Answers.Text: Is there a way to make the log message easier to "watch" in the JS console Application->Logs? I'm running the install on a live server and not locally so I don't have that direct access to the file to watch it all the time.
Answers.UserDisplayName: naboovalley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-10T12:39:51.320Z
Answers.Text: By using `MyPlugin::Log()` you will be able to use the search term `MyPlugin`to filter messages, but it is still a pain to open the application>logs, etc. I would suggest using `ssh` and the `tail -F` method. It will likely save you time in the long run, and once running it's a continuous feed. No need to open or close anything! Keep in mind, not all log messages will go to the browser console either. If, for example, the process takes place on the server during a redirect operation.
Answers.UserDisplayName: Douglas McDonald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-10T12:43:38.683Z
Answers.Text: Ok. I'll try that. Cheers :)
Answers.UserDisplayName: naboovalley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-09T15:07:49.967Z
Answers.LastActivityDate: 2014-10-09T15:15:02.097Z
Answers.LastEditDate: 2014-10-09T15:15:02.097Z
Answers.UserDisplayName: Douglas McDonald
Body: <p>Is there any way to group or sort my own "Craft::log()" calls for my Plugins?</p>
  
  <p>It's a bit tedius to go through the Application->Logs each page load to try and find my own log messsages.</p>
  
  <p>Maybe someone has a better approach to this?</p>
  
Tags: <plugin-development>
Title: Grouping/sorting for easier view of Craft::log messages
ThreadText: # Grouping/sorting for easier view of Craft::log messages
  
  (Asked by: username_0 on 2014-10-09)
  
  Is there any way to group or sort my own "Craft::log()" calls for my Plugins?
  
  It's a bit tedius to go through the Application->Logs each page load to try and find my own log messsages.
  
  Maybe someone has a better approach to this?
  
  **Tags:** plugin-development
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-10-09. Score: 3
  
  Your plugin can keep its own log using `MyPlugin::log('Message', LogLevel::Error);`. A `log` method gets created automatically by extending BasePlugin. The plugin log will be located in `craft/storage/runtime/logs/` along with the default logs.
  
  As a side note: The log files can be watched from the command line using `tail -F /full/path/to/log/file` rather than having to constantly reload the log in a text editor. Although apparently some text editors also support live updates as well.
  
  > **Comments:**
  > **username_0**: Is there a way to make the log message easier to "watch" in the JS console Application->Logs? I'm running the install on a live server and not locally so I don't have that direct access to the file to watch it all the time.  
  > **username_1**: By using `MyPlugin::Log()` you will be able to use the search term `MyPlugin`to filter messages, but it is still a pain to open the application>logs, etc. I would suggest using `ssh` and the `tail -F` method. It will likely save you time in the long run, and once running it's a continuous feed. No need to open or close anything! Keep in mind, not all log messages will go to the browser console either. If, for example, the process takes place on the server during a redirect operation.  
  > **username_0**: Ok. I'll try that. Cheers :)  
  
  ---
  
  