14 Commits

Author SHA1 Message Date
Zuul
4566efc325 Merge "improve logging" 2020-09-01 12:48:29 +00:00
Schiefelbein, Andrew
20d2a99190 improve logging
This will help on debugging and / or error messages which
will show what package and what line a message came from

This is pared down from what is currently being proposed for the UI
https://review.opendev.org/#/c/747473/

Change-Id: I68eb8b0141a8d56d5ea14aa623a25f9287ff1e75
2020-08-27 16:02:38 -05:00
Ruslan Aliev
160117af3a Use log module to determine current log level
As part of config refactoring process, it makes sense to
remove Debug field of AirshipCTLSettings and use log module
method as source of truth about current log level.

Change-Id: I42e3a9fd3b4e2778c71278f98a0d168421dfd2fb
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
2020-08-25 16:29:19 -05:00
Ian Howell
07896b97c5 Add a prefix to the logger
This will make it easier to differentiate between airship log messages
and third-party log message (e.g. clusterctl)

Change-Id: I0b8a2fed58a6a673277f511267e2498c7e8d4c1b
2020-05-01 12:14:33 -05:00
Yasin, Siraj (SY495P)
c25d223c7b Add copyright for missing files
* added license templates for go, bash & yaml in tools dir
* added a script that will add license information for all
    missing files. Type:  go, yaml, yml, sh
* skip adding license for all files within testdata
* Syntax:
   > ./tools/add_license.sh

* Skip license for manifests folder
* Added one extra line after licene for yaml files
* Added License after Hashbang for bash.
* Add an extra line after hashbang and before license
* Updated the go template to use multiline comments

New Files:
  1. tools/add_license.sh
  2. tools/license_go.txt
  3. tools/license_yaml.txt
  4. tools/license_bash.txt

Change-Id: Ia4da5b261e7cd518d446896b72c810421877472a
Realtes-To:#147
2020-04-09 08:35:59 -05:00
Dmitry Ukov
e57b3ce4c0 Show isogen container logs if debug is enabled
Change-Id: I92c82eecdb35de22cc4da2326632b8af3aadd4cd
2020-03-13 12:53:30 +04:00
Ian Howell
d775b2159a This updates the current unit tests for testify
This commit removes any assertion from Go's "testing" package,
preferring instead to use an assertion from the testify package. All
tests now have uniformity.

This also decrease the number of iterations in the password generation
test, decreasing test runtime tenfold

Change-Id: I8799110e93dfa19bebe9050528e865b4c991c3df
2019-11-07 12:15:06 -06:00
Ian Howell
062f59119f This isolates logging from the standard library
This commit adds a custom encapsulated Logger, which then has its
methods exposed in a controlled fashion. This prevents external
libraries from modifying things such as the flags passed to the logger,
or where it should output to.

Change-Id: Ide4321246b1277fcee51608aa95532b8696b9777
2019-10-04 10:36:41 -05:00
Ian Howell
6e41a56a7d Rename module to reflect its new location
Change-Id: I5c8c524c4d3f569b21b5b829722b3c49952cb0ab
2019-07-01 12:15:29 -05:00
Ian Howell
56a4824524 Fix unit tests 2019-06-06 15:27:57 -05:00
Ian Howell
68cfcf82ae Fix log tests 2019-06-06 11:40:40 -05:00
Ian Howell
cbd1e048c9 Move the client objects out of the settings objects
* This also modifies the way that logging is handled
2019-06-06 10:57:33 -05:00
Ian Howell
7a34fd98d9 Change airshipadm to airshipctl 2019-05-07 10:07:54 -05:00
Ian Howell
7e2609d1e8 Add logging 2019-05-03 13:20:38 -05:00