Skip to content

Structured (JSON) logging support? #50

@matt-deboer

Description

@matt-deboer

I'm noticing that for my command-issuer.keyfactor.com/v1alpha1/Issuer resource deployed in GKE, all logs appear at "severity: ERROR", with an embedded log line with actual severity.

I'm wondering if there's some hidden option to enable json formatted logs for ingestion by logging systems that expect structured logs (like google cloud logging)?

Here's an example of one such expanded message in the google cloud console:

{
    insertId: "*****"
    labels: {
        compute.googleapis.com/resource_name: "******"
        k8s-pod/app_kubernetes_io/instance: "command-cert-manager-issuer"
        k8s-pod/app_kubernetes_io/name: "command-cert-manager-issuer"
        k8s-pod/pod-template-hash: "****"
        logging.gke.io/top_level_controller_name: "command-cert-manager-issuer"
        logging.gke.io/top_level_controller_type: "Deployment"
    }
    logName: "projects/*******/logs/stderr"
    receiveTimestamp: "2025-09-15T01:57:31.060623082Z"
    resource: {
        labels: {
            cluster_name: "******"
            container_name: "command-cert-manager-issuer"
            location: "*****"
            namespace_name: "command-issuer-system"
            pod_name: "*****"
            project_id: "*****"
        }
        type: "k8s_container"
    }
    severity: "ERROR"
    textPayload: "2025-09-15T01:57:26Z	INFO	Configuration was valid - Successfully generated server config	{"controller": "issuer", "controllerGroup": "command-issuer.keyfactor.com", "controllerKind": "Issuer", "Issuer": {"name":"keyfactor-command-issuer","namespace":"******"}, "namespace": "******", "name": "*****", "reconcileID": "*****", "authMethod": "basic", "hostname": "*****.keyfactorpki.com", "apiPath": "KeyfactorAPI"}"
    timestamp: "2025-09-15T01:57:26.947824059Z"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions