uuv_trajectory_generator/_log.py
Go to the documentation of this file.
1 # Copyright (c) 2016-2019 The UUV Simulator Authors.
2 # All rights reserved.
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 LOGGER = None
17 
18 def get_logger():
19  global LOGGER
20  if LOGGER is None:
21  import logging
22  import sys
23 
24  LOGGER = logging.getLogger('uuv_trajectory_generator')
25  out_hdlr = logging.StreamHandler(sys.stdout)
26  out_hdlr.setFormatter(logging.Formatter(' %(asctime)s | %(levelname)s | %(module)s | %(message)s'))
27  out_hdlr.setLevel(logging.INFO)
28  LOGGER.addHandler(out_hdlr)
29  LOGGER.setLevel(logging.INFO)
30 
31  return LOGGER


uuv_trajectory_control
Author(s):
autogenerated on Thu Jun 18 2020 03:28:42