# @testcomplete/loggerutil

> A log output interface to let scripts working with TestComplete & NodeJS at the same time

Latest version **0.1.2** (published 2022-05-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @testcomplete/loggerutil
pnpm add @testcomplete/loggerutil
yarn add @testcomplete/loggerutil
bun add @testcomplete/loggerutil
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2022-05-17 |
| First published | 2022-05-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nicolas DUPRE |
| Maintainers | testcomplete |
| Keywords | TestComplete, NodeJS, Automation, Interface, Logging, Compatibility, Util |

## Links

- npm: https://www.npmjs.com/package/@testcomplete/loggerutil
- Repository: https://github.com/neooblaster/-testcomplete-LoggerUtil
- Homepage: https://github.com/neooblaster/-testcomplete-LoggerUtil#readme
- Issues: https://github.com/neooblaster/-testcomplete-LoggerUtil/issues
- npm.io page: https://npm.io/package/@testcomplete/loggerutil

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2022-05-17
- 0.1.1 — 2022-05-11
- 0.1.0 — 2022-05-10

## README

# TestComplete - LoggerUtil

> A log output interface to let scripts working with TestComplete & NodeJS at the same time.

* **Version** : ``v0.1.2``
* **Compatibility** : **TestComplete** - **NodeJS**
* **Script** : ``./node_modules/@testcomplete/loggerutil/LoggerUtil.js``
* **Dependencies** :
    * none
  
  
## Summary

[](BeginSummary)
* [Summary](#summary)
* [LoggerUtil Setup for TestComplete](#loggerutil-setup-for-testcomplete)
* [Get Started](#get-started)
* [Log a message `message()`](#log-a-message-message)
* [Log a warning `warning()`](#log-a-warning-warning)
* [Log an error `error()`](#log-an-error-error)
[](EndSummary)



## LoggerUtil Setup for TestComplete

As this library is published on **npmjs**,
you can easily get library with the following command
if you have **nodejs** installed on your computer.

````bash
npm install @testcomplete/loggerutil
````

Please confer to this documentation to add script in TestComplete :

Script List for the setup :

* ``./node_modules/@testcomplete/loggerutil/LoggerUtil.js``

[@testcomplete/testcompletelibrarysetup](https://www.npmjs.com/package/@testcomplete/testcompletelibrarysetup)



## Get Started

First of all, you have to add the script ``LoggerUtil.js`` to your
script library in **TestComplete**.

In any script (TestComplete of NodeJs), require library like this

````javascript
// Check for NodeJS. If NodeJS, require need relative path
let sPrePath = typeof process !== 'undefined' ? './' : '';

let logger = require(`${sPrePath}LoggerUtil`);
````
    
    
    
## Log a message `message()`

The method ``message( ...[] )`` log an info message text.

````javascript
// Log a message in registry (or stdout)
logger().message('My message text');
````



## Log a warning `warning()`

The method ``warning( ...[] )`` log the provided message with the warning state.

````javascript
// Log a warning in registry (or stdout)
logger().warning('My message text');
````



## Log an error `error()`

The method ``error( ...[] )`` log the provided message with the error state.

````javascript
// Log an error in registry (or stdout)
logger().error('My message text');
````

---
_Source: https://npm.io/package/@testcomplete/loggerutil · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
