mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 23:48:05 +03:00
Log console messages to NSLog (so we can see them in Console.app)
This commit is contained in:
parent
d3443ad2f1
commit
5b9a305bba
@ -95,11 +95,10 @@ bool AtomCefClient::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& source,
|
||||
int line) {
|
||||
REQUIRE_UI_THREAD();
|
||||
std::cout << std::string(message) << "\n";
|
||||
Log(message.ToString().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool AtomCefClient::OnKeyEvent(CefRefPtr<CefBrowser> browser,
|
||||
const CefKeyEvent& event,
|
||||
CefEventHandle os_event) {
|
||||
|
@ -111,6 +111,7 @@ class AtomCefClient : public CefClient,
|
||||
void ShowSaveDialog(int replyId, CefRefPtr<CefBrowser> browser);
|
||||
CefRefPtr<CefListValue> CreateReplyDescriptor(int replyId, int callbackIndex);
|
||||
void Exit(int status);
|
||||
void Log(const char *message);
|
||||
|
||||
IMPLEMENT_REFCOUNTING(AtomCefClient);
|
||||
IMPLEMENT_LOCKING(AtomCefClient);
|
||||
|
@ -92,3 +92,7 @@ CefRefPtr<CefListValue> AtomCefClient::CreateReplyDescriptor(int replyId, int ca
|
||||
void AtomCefClient::Exit(int status) {
|
||||
exit(status);
|
||||
}
|
||||
|
||||
void AtomCefClient::Log(const char *message) {
|
||||
NSLog(@"%s", message);
|
||||
}
|
Loading…
Reference in New Issue
Block a user