{
    "$schema": "https://apidocs.iqrf.org/iqrf-gateway-daemon/com.iqrftech.self-desc/schema/jsonschema/1-0-0#",
    "self": {
        "vendor": "com.iqrftech.self-desc",
        "name": "schema__shape__TraceFileService",
        "format": "jsonschema",
        "version": "1-0-0"
    },
    "type": "object",
    "properties": {
        "component": {
            "type": "string",
            "description": "Name of the component.",
            "enum": [
                "shape::TraceFileService"
            ]
        },
        "instance": {
            "type": "string",
            "description": "Recomended shape::TraceFileService-(id)",
            "default": "shape::TraceFileService-1"
        },
        "path": {
            "type": "string",
            "description": "Path to the trace files",
            "default": ""
        },
        "filename": {
            "type": "string",
            "description": "Name of the trace file",
            "default": "IqrfDaemon.txt"
        },
        "maxSize": {
            "type": "integer",
            "description": "Maximum size of the file",
            "default": 1048576
        },
        "timestampFiles": {
            "type": "boolean",
            "description": "The file is timestamped in format YYY-MM-DD-hh-mm-ss-mss-<filename> to avoid overwrite",
            "default": false
        },
        "maxAgeMinutes": {
            "type": "integer",
            "description": "Maximum age of the timestamped files in minutes. If set to zero or not present it is not applied",
            "default": 0
        },
        "maxNumber": {
            "type": "integer",
            "description": "Maximum number of the timestamped files. If set to zero or not present it is not applied",
            "default": 0
        },
        "VerbosityLevels": {
            "type": "array",
            "description": "Array of pairs channel and verbosity level",
            "items": {
                "type": "object",
                "properties": {
                    "channel": {
                        "type": "integer",
                        "default": 0,
                        "description": "The channel to be routed to the file"
                    },
                    "level": {
                        "type": "string",
                        "default": "DBG",
                        "description": "Set level of trace",
                        "enum": [
                            "DBG",
                            "INF",
                            "WAR",
                            "ERR"
                        ]
                    }
                },
                "required": [
                    "channel",
                    "level"
                ]
            }
        },
        "RequiredInterfaces": {
            "type": "array",
            "description": "Array of required interfaces.",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "default": "iqrf::IMessagingService",
                        "description": "..."
                    },
                    "target": {
                        "type": "object"
                    }
                },
                "required": [
                    "name",
                    "target"
                ]
            }
        }
    },
    "required": [
        "component",
        "instance",
        "path",
        "filename",
        "VerbosityLevels"
    ]
}
