stable api does not log errors onto the server side log

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • Hide

      python test runs the distinct command (as expected since strict set to False, but no deprecation warnings or errors are found anywhere either in logging or result)

      import pymongo
      from pymongo import MongoClient
      from pymongo.server_api import ServerApi

      client = MongoClient("mongodb+srv://tc:noregret@cluster1.thbs0.mongodb.net/?readPreference=primary",
                           server_api=ServerApi("1",
                           strict=False,
                           deprecation_errors=True))
      db = client["test"]
      coll = db["test"]
      coll.distinct("title")

       

       

      Show
      python test runs the distinct command (as expected since strict set to False, but no deprecation warnings or errors are found anywhere either in logging or result) import pymongo from pymongo import MongoClient from pymongo.server_api import ServerApi client = MongoClient("mongodb+srv://tc:noregret@cluster1.thbs0.mongodb.net/?readPreference=primary",                      server_api=ServerApi("1",                      strict=False,                      deprecation_errors=True)) db = client ["test"] coll = db ["test"] coll.distinct("title")    
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      what set of parameters can enable deprecation errors or warnings to be logged onto the server side logs?

      is there a way to audit for commands that are of non-stable api?

      related to https://jira.mongodb.org/browse/HELP-73748

       

      --apiVersion 1 --apiStrict true --apiDeprecationErrors true works as expected when running non-stable api command such as db.collection.distict() (with this throwing an "MongoServerError[APIStrictError]: Provided apiStrict:true, but the command distinct is not in API Version 1")

      --apiVersion 1 --apiStrict false --apiDeprecationErrors true however does not provide any additional logging or warning (either through its output or in mongod.logs)

       

       

       

            Assignee:
            Kenan Ali
            Reporter:
            Tom Chong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: