<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>

CC BY-SA 3.0
2014-10-10T06:03:46.423Z
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.
naboovalley
CC BY-SA 3.0
2014-10-10T12:39:51.320Z
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.
Douglas McDonald
CC BY-SA 3.0
2014-10-10T12:43:38.683Z
Ok. I'll try that. Cheers :)
naboovalley
CC BY-SA 3.0
2014-10-09T15:07:49.967Z
2014-10-09T15:15:02.097Z
2014-10-09T15:15:02.097Z
Douglas McDonald
<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>

<plugin-development>
Grouping/sorting for easier view of Craft::log messages
# 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 :)  

---

