Mac os console log

Find log messages and activities in Console on Mac

You can search for log messages and activities — for example, you can:

Type a word or phrase to find log messages that match it.

Show log messages from a certain process.

Search for log messages that don’t match certain criteria.

Once you complete a search, you can save it to use again.

Note: If you’re not logged in as an administrator, you need to enter an administrator name and password to search for and view log messages.

Tip: If you know you want to search for log messages for a specific device, select the device in the sidebar before you start.

Search for specific text

In the Console app on your Mac, type a search phrase, then press Return.

To search activities, click the Activities button in the toolbar (or use the Touch Bar).

Log messages or activities that fit the search criteria appear in the Console window. You can further refine the results.

Use the shortcut menu to show or hide specific items

In the Console app on your Mac, Control-click a log message or activity.

In the shortcut menu, hide or show a specific property (such as a Process, Thread ID or Message Type). For example, to stop displaying log messages from a particular process, hide that process.

After you select an option, it is added to the search field, and the search results are updated with the log messages or activities that fit the search criteria. You can further refine the results.

Refine the results

In the Console app on your Mac, refine your search results by doing any of the following:

Change which property to search: Click the arrow next to a search filter, then choose a property. For example, search within the process or the message.

Tip: To use the Date & Time search filter, type the date in YYYY-MM-DD format. For example, for 10 September 2019, type 2019-09-10.

Use multiple search filters: Place the pointer after the first filter, start typing search text, press Return, then change the search filter if desired. Repeat as needed; the search field scrolls as you add more filters.

Refine search filters: Click the arrow next to a search filter, then choose an option from the menu that appears. For example, you can choose to show log messages that contain the search phrase or that don’t contain it.

For example, to search for log messages that come from the process “Spotlight” but not the library “QuartzCore,” your search would look like this:

Use property shortcuts: Enter the search criteria preceded by its property shortcut. For example, to search for log messages that come from the process “Spotlight,” type p:Spotlight .

If you think you’ll search for a particular set of log messages or activities again, you can save your search to make it easier to find the information next time.

In the Console app on your Mac, click Save below the search field.

Читайте также:  Переустановить windows гарантия ноутбук

Enter a name for the search.

The saved search appears in the Favourites bar.

Tip: To remove a saved search from the Favourites bar, Control-click it, then choose Remove, or press and hold the Command key, then drag it away from the Favourites bar. You can also press and hold the Command key, then drag to reorder the saved searches.

Console looks for log messages that match all of the filters; the more criteria you use, the more refined the search. If you don’t get expected results, remove or change some of the filters.

Источник

Просмотр отчетов в Консоли на Mac

Приложение «Консоль» может составлять различные отчеты, содержащие общую диагностическую информацию, а также сведения об операционной системе и приложениях. В боковом меню можно получить доступ к следующим отчетам.

Отчеты о сбоях. Системные отчеты и отчеты пользователей системы о сбоях приложений и процессов. Отчеты о сбоях имеют расширение .crash.

Отчеты Spindump. Системные отчеты и отчеты пользователей системы с подробной информацией о неполадках приложений и процессов. Отчеты Spindump имеют расширение .spin.

Отчеты журналирования. Системные отчеты и отчеты пользователей системы с информацией о событиях, произошедших во время работы системы или определенных приложений. Отчеты журналирования имеют расширение .log, ._log или .its.

Диагностические отчеты. Системные отчеты и отчеты пользователей системы с информацией о ресурсах аппаратного обеспечения, времени реакции системы и другими данными. Диагностические отчеты имеют расширение .diag или .dpsub.

Данные анализа Mac. Содержимое хранилища данных отслеживания сообщений доступно по адресу /var/log/DiagnosticMessages.

Системный журнал. Содержимое устаревшего файла системного журнала доступно по адресу /private/var/log/system.log.

Отчеты о пользователях поступают из приложений, в которых работает текущий пользователь. Системные отчеты — из компонентов операционной системы, которые относятся ко всем пользователям. Если Вы вошли в систему в качестве администратора, Вы можете просмотреть все отчеты. Если Вы вошли в систему не в качестве администратора, Вы можете просмотреть только отчеты пользователя.

В приложении «Консоль» на Mac можно сделать следующее.

Просмотр отчета. Выберите тип отчета в разделе «Отчеты» в боковом меню (например, отчеты журналирования), затем выберите отчет в верхней части окна. Сведения об отчете появятся ниже.

Во время просмотра отчета у Вас есть следующие возможности.

Открыть отчет в отдельном окне. Дважды нажмите отчет.

Открыть отчет в Finder. Выберите «Файл» > «Показать в Finder».

Переместить отчет в Корзину. Выберите «Файл» > «Переместить в Корзину».

Сортировка отчетов. Поместите указатель на название столбца, по которому нужно выполнить сортировку, и нажмите кнопку мыши. Порядок всех строк в списке отчетов изменяется в соответствии с выбранным для упорядочения столбцом. Нажмите название столбца еще раз, чтобы изменить порядок сортировки.

Поиск текста в отчете. Дважды нажмите отчет, затем введите текст в поле поиска.

По мере ввода будут отображаться только подходящие результаты.

Источник

Mac os console log

syslog -C | open -f

opens the syslog in TextEdit where you can view, search, etc.

Me, I usually pipe things like this

syslog -C | bbmore

where ‘bbmore’ is
alias bbmore=’bbedit —clean —view-top —new-window -t ‘\»Unix output’\»’

What’s different between this and the stock «Console Messages» query provided by Console.app (in the «Show Log List» sidebar)? That query certainly looked to me like the same thing as the old console.log file (and it looks like a prettier version of what syslog -C outputs).

Or have OS versions post-10.5 removed the «Console Messages» query and just left the «All Messages» one?

Читайте также:  The room two windows phone

That said, syslog -C does look like a handy tip for ssh usage, where I have bemoaned the loss of the console.log file.

As I say in the hint, when Leopard came around, they removed that from Console.

Sorry, looking back I see I wasn’t clear.

I was talking about the «Console Messages» item that’s present by default in the sidebar starting on 10.5, replacing the item for «console.log» (the file), which was removed on 10.5.

The «Console Messages» item most certainly is present on 10.5; it was introduced then, not removed then 😉 Has it been removed post-10.5, as my second paragraph asked?

I didn’t have a «Console Messages» item in my log list on Lion, but I was able to re-create it by going to «File» > «New System Log Query. » and adding the condition:

[ Facility ] [ is equal to ] com.apple.console

That matches the behavior of «syslog -C», according to the syslog man page (and my own brief testing).

Interestingly, the Terminal output is more readable. For example, in mine right now:

May 31 23:39:11 Walden [0x0-0x1ee1ee].com.apple.Safari[4862] : May 31 23:39:11 Walden.local WebProcess[4864] : CGContextSetLineDash: invalid dash array: at least one element must be non-zero.
— last message repeated 83 times —
May 31 23:39:12 Walden [0x0-0x1ee1ee].com.apple.Safari[4862] : May 31 23:39:12 Walden.local WebProcess[4864] : CGContextSetLineDash: invalid dash array: at least one element must be non-zero.
— last message repeated 19 times —

Whereas Console shows each of the repetitions.

Источник

View log messages in Console on Mac

Use Console to view log messages collected by your computer and other connected devices. These log messages may deal with system events, dialog text, errors, status, and other communications. If a problem occurs, you may be able to find information about the cause of the problem by viewing either log messages or activities.

Note: If you’re not logged in as an administrator, you need to enter an administrator name and password to view log messages.

In the Console app on your Mac, in the Devices list on the left, select the device you want to view log messages for (such as your Mac, iPhone, iPad, Apple Watch, or Apple TV). If you don’t see the Devices list, click the Sidebar button in the Favorites bar.

In the window to the right, click “Start streaming.”

The log messages for the device appear in the window to the right.

The type of log message is indicated by a dot in the Type column:

Red: Faults

Yellow: Errors

Dark gray: Debug log messages

Light gray: Info log messages

Note: If there is no dot in the Type column, the log message is the default type.

Do any of the following:

View an entire log message in the Messages column: Click the log message, then press the Right Arrow key, or choose View > Expand Selected Row. To shorten the log message to one line again, press the Left Arrow key, or choose View > Collapse Selected Row.

View all details of a log message: Click Details in the log message details in the lower half of the Console window. If you don’t see the log message details, click the Info button in the toolbar (or use the Touch Bar), or choose View > Show Info Pane. To see fewer details, click Hide.

Читайте также:  Создание загрузочной флешки для windows server 2019

Search for a specific log message in the current view: Click the log message, then press Command-F. See Find text in log messages and reports.

While viewing log messages, you can move columns and change which columns appear; view the most recent activity; and apply saved searches. See Customize the log window.

Источник

Follow System & Kernel Logs from Command Line in Mac OS X

If you’re troubleshooting some of the more difficult problems that you can have on a Mac, a good place to look are the System & Kernel Logs contained within Console app. But you can access the same OS X logs from the Terminal too.

Why bother reading system logs from the terminal when there’s an OS X app to do it natively in the GUI? Well there are many reasons, perhaps because you are reviewing logs remotely with ssh, maybe you just prefer the terminal, or, maybe things are really going south. In the latter situation, unfortunately there are times when you can’t access Console either because you are remotely troubleshooting, in Single User Mode, or even because the log files have grown so large that it actually starts crashing Console.app when it’s trying to load (this has happened to me more than once). Yes, from time to time, problems can be so bad that even the OS X Console log can’t be opened directly! But fear not if this occurs to you, you can still track down and monitor the system log of Mac OS X by turning to the command line of the Mac.

If you’re in this situation, or any other reason that you’d want to follow your Console system log from the command line, here’s all you need to type:

tail -f /var/log/system.log

You can do the same with the kernel log, which is great if you’re troubleshooting hardware and connectivity issues:

tail -f /var/log/kernel.log

The tail -f command allows the specified file to be read and printed to your screen in a live stream. There are plenty of other log files you can follow contained within /var/log but the above two are generally the most useful for troubleshooting purposes.

You can also use the less command on log files, like so:

Once you have the log file opened with less, hit the “F” key to continuously update the log file as it updates live, making it kind of like tail -f in that it offers a constantly updating log file for easy viewing.

The syslog command is another option, but quite the firehose if you’re running syslog uncontrolled by grep, awk, more, or less. See for yourself with:

You’ll find it to be a bit overwhelming, and much more manageable by piping through more:

The syslog command is well featured with some perks though, discover more with the –help flag, which will show you how to export the contents of a log file, read specific logs, match logs to processes, and much more.

You could also combine these commands with GeekTool if you want to see system log activity directly on your Mac OS X desktop. Or just throw a Terminal window onto the Mac, maybe make it transparent for some easier multitasking views, and happy troubleshooting, administration, or development to you.

Источник

Оцените статью