Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
TraceAccessor.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* TraceAccessor.cc (C) 2000-2020 */
9/* */
10/* Accès aux traces. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/trace/ITraceMng.h"
15#include "arccore/trace/TraceAccessor.h"
16
17/*---------------------------------------------------------------------------*/
18/*---------------------------------------------------------------------------*/
19
20namespace Arccore
21{
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
28: m_local_verbose_level(TraceMessage::DEFAULT_LEVEL)
29{
30 if (trace)
31 m_trace = makeRef(trace);
32}
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
39: m_trace(rhs.m_trace)
40, m_local_verbose_level(rhs.m_local_verbose_level)
41{
42}
43
44/*---------------------------------------------------------------------------*/
45/*---------------------------------------------------------------------------*/
46
48operator=(const TraceAccessor& rhs)
49{
50 if (&rhs!=this){
51 m_trace = rhs.m_trace;
52 m_local_verbose_level = rhs.m_local_verbose_level;
53 }
54 return (*this);
55}
56
57/*---------------------------------------------------------------------------*/
58/*---------------------------------------------------------------------------*/
59
62{
63}
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
72traceMng() const
73{
74 return m_trace.get();
75}
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80#ifdef ARCCORE_DEBUG
83{
84 return m_trace->debug(dbg_lvl);
85}
86#endif
87
88/*---------------------------------------------------------------------------*/
89/*---------------------------------------------------------------------------*/
90
92configDbgLevel() const
93{
94 return m_trace->configDbgLevel();
95}
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
101info() const
102{
103 return m_trace->info();
104}
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
110info(char category) const
111{
112 return m_trace->info(category);
113}
114
115/*---------------------------------------------------------------------------*/
116/*---------------------------------------------------------------------------*/
117
119info(bool v) const
120{
121 return m_trace->info(v);
122}
123
124/*---------------------------------------------------------------------------*/
125/*---------------------------------------------------------------------------*/
126
129{
130 //cout << "LOCAL level=" << verbose_level << " local=" << m_local_verbose_level << '\n';
131 return m_trace->info(verbose_level); //m_local_verbose_level>=verbose_level);
132}
133
134/*---------------------------------------------------------------------------*/
135/*---------------------------------------------------------------------------*/
136
138pinfo() const
139{
140 return m_trace->pinfo();
141}
142
143/*---------------------------------------------------------------------------*/
144/*---------------------------------------------------------------------------*/
145
147pinfo(char category) const
148{
149 return m_trace->info(category);
150}
151
152/*---------------------------------------------------------------------------*/
153/*---------------------------------------------------------------------------*/
154
156logdate() const
157{
158 return m_trace->logdate();
159}
160
161/*---------------------------------------------------------------------------*/
162/*---------------------------------------------------------------------------*/
163
165log() const
166{
167 return m_trace->log();
168}
169
170/*---------------------------------------------------------------------------*/
171/*---------------------------------------------------------------------------*/
172
174plog() const
175{
176 return m_trace->plog();
177}
178
179/*---------------------------------------------------------------------------*/
180/*---------------------------------------------------------------------------*/
181
183warning() const
184{
185 return m_trace->warning();
186}
187
188/*---------------------------------------------------------------------------*/
189/*---------------------------------------------------------------------------*/
190
192pwarning() const
193{
194 return m_trace->pwarning();
195}
196
197/*---------------------------------------------------------------------------*/
198/*---------------------------------------------------------------------------*/
199
201error() const
202{
203 return m_trace->error();
204}
205
206/*---------------------------------------------------------------------------*/
207/*---------------------------------------------------------------------------*/
208
210perror() const
211{
212 return m_trace->perror();
213}
214
215/*---------------------------------------------------------------------------*/
216/*---------------------------------------------------------------------------*/
217
219fatal() const
220{
221 return m_trace->fatal();
222}
223
224/*---------------------------------------------------------------------------*/
225/*---------------------------------------------------------------------------*/
226
228pfatal() const
229{
230 return m_trace->pfatal();
231}
232
233/*---------------------------------------------------------------------------*/
234/*---------------------------------------------------------------------------*/
235
236void TraceAccessor::
237fatalMessage(const StandaloneTraceMessage& o) const
238{
239 m_trace->fatalMessage(o);
240}
241
242/*---------------------------------------------------------------------------*/
243/*---------------------------------------------------------------------------*/
244
245} // End namespace Arccore
246
247/*---------------------------------------------------------------------------*/
248/*---------------------------------------------------------------------------*/
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Interface du gestionnaire de traces.
Gestion d'un message autonome.
TraceMessage pwarning() const
TraceMessage log() const
Flot pour un message de log.
TraceMessage pinfo() const
Flot pour un message d'information en parallèle.
TraceMessage pfatal() const
Flot pour un message d'erreur fatale en parallèle.
virtual ~TraceAccessor()
Libère les ressources.
TraceAccessor & operator=(const TraceAccessor &rhs)
Opérateur de recopie.
ITraceMng * traceMng() const
Gestionnaire de trace.
TraceMessage plog() const
Flot pour un message de log.
TraceMessage error() const
Flot pour un message d'erreur.
TraceMessageDbg debug(Trace::eDebugLevel=Trace::Medium) const
Flot pour un message de debug.
TraceMessage warning() const
Flot pour un message d'avertissement.
TraceMessage perror() const
TraceMessage info() const
Flot pour un message d'information.
TraceMessage fatal() const
Flot pour un message d'erreur fatale.
TraceMessage logdate() const
Flot pour un message de log précédé de la date.
Trace::eDebugLevel configDbgLevel() const
Niveau debug du fichier de configuration.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
eDebugLevel
Niveau de debug des traces.
Espace de nom de Arccore.
Definition ArcaneTypes.h:24
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Créé une référence sur un pointeur.
std::int32_t Int32
Type entier signé sur 32 bits.