BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
EyalGonen
Lapis Lazuli | Level 10

Hi experts,

 

I want to use the sas-viya CLI with its "configuration" plug-in to create a new logging.level for the "identities" service. For example, to create a "com.sas" logger with level "DEBUG".  I could not find any example.

 

The only example I found is this https://documentation.sas.com/doc/en/sasadmincdc/v_056/calconfig/p0rtltqk08n6y6n1hts1n4ypqfao.htm#n0... but it seems irrelevant to what I seek.

 

I believe I know how to update an existing logger, let's say from INFO to DEBUG or vice versa, but not how to create a new logger for a service if it does not exist.

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ

I think this is the file syntax you'd need to use the CLI to do this:

{
        "version": 2,
        "accept": "application/vnd.sas.configuration.config+json",
        "name": "configurations",
        "items": [
                {
                        "metadata": {
                                "isDefault": false,
                                "mediaType": "application/vnd.sas.configuration.config.logging.level+json;version=1",
                                "services": [
                                        "identities"
                                ]
                        },
                        "version": 1,
                        "level": "DEBUG",
                        "name": "com.sas"
                }
        ]
}
--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

3 REPLIES 3
gwootton
SAS Super FREQ

I think this is the file syntax you'd need to use the CLI to do this:

{
        "version": 2,
        "accept": "application/vnd.sas.configuration.config+json",
        "name": "configurations",
        "items": [
                {
                        "metadata": {
                                "isDefault": false,
                                "mediaType": "application/vnd.sas.configuration.config.logging.level+json;version=1",
                                "services": [
                                        "identities"
                                ]
                        },
                        "version": 1,
                        "level": "DEBUG",
                        "name": "com.sas"
                }
        ]
}
--
Greg Wootton | Principal Systems Technical Support Engineer
EyalGonen
Lapis Lazuli | Level 10

Thanks @gwootton !

 

One last question about this: I ran the "sas-viya" CLI and it created the logging.level configuration but how do I know if it succeeded? or not programmatically? Is there a way to capture the HTTP response code from the "sas-viya" CLI or does it return some kind of other return code?

gwootton
SAS Super FREQ
The sas-viya CLI will return a non-zero exit code if the create fails. You can also check the configuration exists using the CLI, e.g. sas-viya configuration configurations list -d logging.level -s identities
--
Greg Wootton | Principal Systems Technical Support Engineer

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Discussion stats
  • 3 replies
  • 669 views
  • 2 likes
  • 2 in conversation