SurgSim
Graphics
OsgLog.h
Go to the documentation of this file.
1
// This file is a part of the OpenSurgSim project.
2
// Copyright 2013, SimQuest Solutions Inc.
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// http://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
16
#ifndef SURGSIM_GRAPHICS_OSGLOG_H
17
#define SURGSIM_GRAPHICS_OSGLOG_H
18
19
#include <osg/Notify>
20
21
#include "
SurgSim/Framework/Log.h
"
22
23
namespace
SurgSim
24
{
25
26
namespace
Graphics
27
{
28
32
class
OsgLog
:
public
osg::NotifyHandler
33
{
34
public
:
39
41
OsgLog
();
42
43
44
47
50
void
notify
(osg::NotifySeverity severity,
const
char
*message)
override
;
51
52
private
:
53
std::shared_ptr<SurgSim::Framework::Logger>
m_logger
;
54
};
55
56
};
// namespace Graphics
57
58
};
// namespace SurgSim
59
60
#endif // SURGSIM_GRAPHICS_OSGLOG_H
SurgSim::Graphics::OsgLog
Enable logging of OSG through SurgSim Logging System To use this, an object of OsgLog class must be c...
Definition:
OsgLog.h:32
SurgSim::Graphics::OsgLog::notify
void notify(osg::NotifySeverity severity, const char *message) override
User defined derived log Method Based on log level 'severity', this method decides whether to log 'me...
Definition:
OsgLog.cpp:33
SurgSim
Definition:
CompoundShapeToGraphics.cpp:29
Log.h
SurgSim::Graphics::OsgLog::OsgLog
OsgLog()
Constructor If OSS_DEBUG is defined, set OSG's log level to the lowest (osg::DEBUG_FP).
Definition:
OsgLog.cpp:26
SurgSim::Graphics::OsgLog::m_logger
std::shared_ptr< SurgSim::Framework::Logger > m_logger
Definition:
OsgLog.h:53
Generated on Tue Jun 2 2020 12:47:05 for OpenSurgSim by
1.8.17