Skip to content

Commit

Permalink
Merge branch 'master' into improve_hb_msg
Browse files Browse the repository at this point in the history
  • Loading branch information
pleonex authored Dec 19, 2016
2 parents e020029 + 389bf0e commit 7f35f4e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@ Logger.get_instance().set_verbosity_by_category(

* Environment variable `NDDS_QOS_PROFILES`. It is possible to specify an inline XML QoS profile inside the variable:
```bash
# Bash
export NDDS_QOS_PROFILES="str://\"<dds><qos_library name=\"myLoggingLib\"><qos_profile name=\"myLoggingProfile\" is_default_participant_factory_profile=\"true\"><participant_factory_qos><logging><verbosity>ALL</verbosity><category>ALL</category><print_format>TIMESTAMPED</print_format></logging></participant_factory_qos></qos_profile></qos_library></dds>\""

# Tcsh
setenv NDDS_QOS_PROFILES 'str://"<dds><qos_library name="myLoggingLib"><qos_profile name="myLoggingProfile" is_default_participant_factory_profile="true"><participant_factory_qos><logging><verbosity>ALL</verbosity><category>ALL</category><print_format>TIMESTAMPED</print_format></logging></participant_factory_qos></qos_profile></qos_library></dds>"'

# Windows CMD
set NDDS_QOS_PROFILES=str://"<dds><qos_library name="myLoggingLib"><qos_profile name="myLoggingProfile" is_default_participant_factory_profile="true"><participant_factory_qos><logging><verbosity>ALL</verbosity><category>ALL</category><print_format>TIMESTAMPED</print_format></logging></participant_factory_qos></qos_profile></qos_library></dds>"
```

Expand Down
2 changes: 1 addition & 1 deletion logparser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Package LogParser."""
"""LogParser package."""

__version__ = "1.2a2"
__license__ = "Apache"
Expand Down
2 changes: 1 addition & 1 deletion logparser/devices/inputdevices.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def print_progress(self, threshold=0, decimals=1, barLength=100):
return

progress = 100.0 * iteration / total
if self.progress > 0 and progress - self.progress < threshold:
if self.progress and progress - self.progress < threshold:
return

self.progress = progress
Expand Down
2 changes: 1 addition & 1 deletion logparser/devices/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def log(content, level, state):
for kind in filter(None, content.get('kind', '').split("|")):
for subkind in KIND_TO_COLOR[kind].split("|"):
color += COLORS[subkind]
if len(color) > 0:
if len(color):
content['description'] = color + content['description'] + \
COLORS['END']

Expand Down
1 change: 0 additions & 1 deletion logparser/devices/markdownformatdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ def write_statistics_bandwidth(self, state):
for typ in stats[addr]:
# If this is a port with dictionary of statistics types
if isinstance(stats[addr][typ], dict):
# Show statistics per port with verbosity >= 1
if state['verbosity'] < 1:
continue
port = typ
Expand Down
4 changes: 2 additions & 2 deletions logparser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def obfuscate(text, state):

def get_oid(oid):
"""Get a name for the entity ID in hexadecimal text format."""
# Information from RTPS Spec: http://www.omg.org/spec/DDSI-RTPS/2.2/PDF/
# Information from RTPS Spec: http://www.omg.org/spec/DDSI-RTPS/
# Security entities: http://www.omg.org/spec/DDS-SECURITY/1.0/Beta2/
BUILTIN_NAMES = {
# Built-in Entity GUIDs
Expand All @@ -190,7 +190,7 @@ def get_oid(oid):
0x02: "W+K", 0x03: "W-K",
0x04: "R-K", 0x07: "R+K"}

# Convert into a number from the hexadecimal text representation
# Convert the hexadecimal text representation to a number
oid_num = int(oid, 16)

# Analyze the entity kind
Expand Down

0 comments on commit 7f35f4e

Please sign in to comment.