Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: remoting/host/host_event_logger_posix.cc

Issue 10800023: Log host startup (Linux/Mac) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/host_event_logger.h" 5 #include "remoting/host/host_event_logger.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 }; 49 };
50 50
51 } //namespace 51 } //namespace
52 52
53 HostEventLoggerPosix::HostEventLoggerPosix(ChromotingHost* host, 53 HostEventLoggerPosix::HostEventLoggerPosix(ChromotingHost* host,
54 const std::string& application_name) 54 const std::string& application_name)
55 : host_(host), 55 : host_(host),
56 application_name_(application_name) { 56 application_name_(application_name) {
57 openlog(application_name_.c_str(), 0, LOG_USER); 57 openlog(application_name_.c_str(), 0, LOG_USER);
58 host_->AddStatusObserver(this); 58 host_->AddStatusObserver(this);
59 Log("Host started");
Jamie 2012/07/18 23:21:34 Please run this string by the relevant stakeholder
Sergey Ulanov 2012/07/18 23:28:17 It's already possible to do that - syslog logs app
Lambros 2012/07/18 23:40:56 I think this string is sufficiently distinctive fr
Wez 2012/07/19 00:41:29 nit: I think this can simply be "Started" - we alr
Lambros 2012/07/19 01:36:34 OK. If we ever need Host/Client distinction, that
59 } 60 }
60 61
61 HostEventLoggerPosix::~HostEventLoggerPosix() { 62 HostEventLoggerPosix::~HostEventLoggerPosix() {
62 host_->RemoveStatusObserver(this); 63 host_->RemoveStatusObserver(this);
63 closelog(); 64 closelog();
Sergey Ulanov 2012/07/18 23:28:17 also log when the host is stopped?
Lambros 2012/07/18 23:40:56 For Linux Me2Me at least, that code doesn't seem t
64 } 65 }
65 66
66 void HostEventLoggerPosix::OnClientAuthenticated(const std::string& jid) { 67 void HostEventLoggerPosix::OnClientAuthenticated(const std::string& jid) {
67 Log("Client connected: " + jid); 68 Log("Client connected: " + jid);
68 } 69 }
69 70
70 void HostEventLoggerPosix::OnClientDisconnected(const std::string& jid) { 71 void HostEventLoggerPosix::OnClientDisconnected(const std::string& jid) {
71 Log("Client disconnected: " + jid); 72 Log("Client disconnected: " + jid);
72 } 73 }
73 74
(...skipping 21 matching lines...) Expand all
95 } 96 }
96 97
97 // static 98 // static
98 scoped_ptr<HostEventLogger> HostEventLogger::Create( 99 scoped_ptr<HostEventLogger> HostEventLogger::Create(
99 ChromotingHost* host, const std::string& application_name) { 100 ChromotingHost* host, const std::string& application_name) {
100 return scoped_ptr<HostEventLogger>( 101 return scoped_ptr<HostEventLogger>(
101 new HostEventLoggerPosix(host, application_name)); 102 new HostEventLoggerPosix(host, application_name));
102 } 103 }
103 104
104 } // namespace remoting 105 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698